Skip to content

Commit

Permalink
v1.4.36-beta.5
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed Aug 12, 2024
1 parent ecdb6f9 commit 79c1cf3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 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.4",
"version": "1.4.36-beta.5",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/contract/states/ContractInteractionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class ContractInteractionState implements InteractionState {
latestState.set(k, state.cachedValue);
}
});
await this.doStoreJson(latestState, interaction, forceStore);
this.doStoreJson(latestState, interaction, forceStore).then();
await this.commitKVs();
} finally {
this.reset();
Expand All @@ -91,7 +91,7 @@ export class ContractInteractionState implements InteractionState {

async rollback(interaction: GQLNodeInterface, forceStateStoreToCache: boolean): Promise<void> {
try {
await this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache);
this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache).then();
await this.rollbackKVs();
} finally {
this.reset();
Expand Down
10 changes: 3 additions & 7 deletions src/core/modules/impl/DefaultStateEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,9 @@ export abstract class DefaultStateEvaluator implements StateEvaluator {
this.logger.info('Update benchmark', updateBenchmark.elapsed());
if (validity[missingInteraction.id]) {
const commitBenchmark = Benchmark.measure();
contract
.interactionState()
.commit(missingInteraction, forceStateStoreToCache)
.then(() => {
commitBenchmark.stop();
this.logger.info('Commit benchmark', commitBenchmark.elapsed());
});
await contract.interactionState().commit(missingInteraction, forceStateStoreToCache);
commitBenchmark.stop();
this.logger.info('Commit benchmark', commitBenchmark.elapsed());
} else {
const rollbackBenchmark = Benchmark.measure();
await contract.interactionState().rollback(missingInteraction, forceStateStoreToCache);
Expand Down

0 comments on commit 79c1cf3

Please sign in to comment.