Skip to content

Commit

Permalink
v1.4.36-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed Aug 10, 2024
1 parent 75be05b commit 94582bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.4.36-beta.1",
"version": "1.4.36-beta.2",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
8 changes: 7 additions & 1 deletion src/core/modules/impl/DefaultStateEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,21 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
const commitBenchmark = Benchmark.measure();
await contract.interactionState().commit(missingInteraction, forceStateStoreToCache);
commitBenchmark.stop();
this.logger.info('Update benchmark', commitBenchmark.elapsed());
this.logger.info('Commit benchmark', commitBenchmark.elapsed());
} else {
const rollbackBenchmark = Benchmark.measure();
await contract.interactionState().rollback(missingInteraction, forceStateStoreToCache);
rollbackBenchmark.stop();
this.logger.info('Rollback benchmark', rollbackBenchmark.elapsed());
}
}
} else {
// if that's an inner contract call - only update the state in the uncommitted states
const interactionState = new EvalStateResult(currentState, validity, errorMessages);
const innerContractCallBenchmark = Benchmark.measure();
contract.interactionState().update(contract.txId(), interactionState, currentSortKey);
innerContractCallBenchmark.stop();
this.logger.info('Inner contract call benchmark', innerContractCallBenchmark.elapsed());
}

forceStateBenchmark.stop();
Expand Down

0 comments on commit 94582bb

Please sign in to comment.