Skip to content

Commit

Permalink
v1.4.36-beta.10
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed Aug 13, 2024
1 parent 3238e24 commit df94d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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.9",
"version": "1.4.36-beta.10",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down
8 changes: 3 additions & 5 deletions src/contract/states/ContractInteractionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export class ContractInteractionState implements InteractionState {
}
});
const doStoreJsonBenchmark = Benchmark.measure();
this.doStoreJson(latestState, interaction, forceStore).then(() => {
this.logger.info(`json stored`);
});
await this.doStoreJson(latestState, interaction, forceStore);
doStoreJsonBenchmark.stop();
this.logger.info('doStoreJsonBenchmark', doStoreJsonBenchmark.elapsed());
const commitKvsBenchmark = Benchmark.measure();
Expand All @@ -102,7 +100,7 @@ export class ContractInteractionState implements InteractionState {

async rollback(interaction: GQLNodeInterface, forceStateStoreToCache: boolean): Promise<void> {
try {
this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache).then();
await this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache);
await this.rollbackKVs();
} finally {
this.reset();
Expand Down Expand Up @@ -150,7 +148,7 @@ export class ContractInteractionState implements InteractionState {
) {
if (states.size > 1 || forceStore) {
for (const [k, v] of states) {
await this._warp.stateEvaluator.putInCache(k, interaction, v);
this._warp.stateEvaluator.putInCache(k, interaction, v).then();
}
}
}
Expand Down

0 comments on commit df94d5c

Please sign in to comment.