Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ppedziwiatr committed Aug 10, 2023
1 parent 9399b9d commit 48f31ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ export class HandlerBasedContract<State> implements Contract<State> {
if (cachedState && cachedState.sortKey == upToSortKey) {
this.logger.debug('State fully cached, not loading interactions.');
if (forceDefinitionLoad || evolvedSrcTxId || interactions?.length) {
const defBenchmark = Benchmark.measure();
contractDefinition = await definitionLoader.load<State>(contractTxId, evolvedSrcTxId);
if (interactions?.length) {
this.logger.debug('Definition load', defBenchmark.elapsed());
if (interactions?.length > 1) {
sortedInteractions = (await this._sorter.sort(interactions.map((i) => ({ node: i, cursor: null })))).map(
(i) => i.node
);
Expand Down

0 comments on commit 48f31ad

Please sign in to comment.