diff --git a/package.json b/package.json index d0186039..4b306fb6 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/contract/states/ContractInteractionState.ts b/src/contract/states/ContractInteractionState.ts index 60bfd158..027eeaf4 100644 --- a/src/contract/states/ContractInteractionState.ts +++ b/src/contract/states/ContractInteractionState.ts @@ -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(); @@ -91,7 +91,7 @@ export class ContractInteractionState implements InteractionState { async rollback(interaction: GQLNodeInterface, forceStateStoreToCache: boolean): Promise { try { - await this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache); + this.doStoreJson(this._initialJson, interaction, forceStateStoreToCache).then(); await this.rollbackKVs(); } finally { this.reset(); diff --git a/src/core/modules/impl/DefaultStateEvaluator.ts b/src/core/modules/impl/DefaultStateEvaluator.ts index 8636e201..08444b1b 100644 --- a/src/core/modules/impl/DefaultStateEvaluator.ts +++ b/src/core/modules/impl/DefaultStateEvaluator.ts @@ -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);