diff --git a/src/app/tabs/runTab/model/settings.js b/src/app/tabs/runTab/model/settings.js index d7e6ae6f0a..2a2cc31fe7 100644 --- a/src/app/tabs/runTab/model/settings.js +++ b/src/app/tabs/runTab/model/settings.js @@ -10,6 +10,13 @@ class Settings { constructor (udapp) { this.udapp = udapp this.event = new EventManager() + this.commits = 0 + + this.udapp.event.register('initiatingTransaction', (error, from, to, data, lookupOnly, txResult) => { + if (error) console.log(error) + executionContext.checkpointAndCommit(() => console.log('checkpoint on VM', this.commits), this.commits) + this.commits++ + }) this.udapp.event.register('transactionExecuted', (error, from, to, data, lookupOnly, txResult) => { this.event.trigger('transactionExecuted', [error, from, to, data, lookupOnly, txResult]) diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index 645afc3b4e..ed74ee70c7 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -202,6 +202,7 @@ export class RunTab extends LibraryPlugin { executionContext.init(this.config) executionContext.stopListenOnLastBlock() executionContext.listenOnLastBlock() + executionContext.checkpointAndCommit(() => console.log('checkpoint on VM'), 0) this.udapp.resetEnvironment() this.renderInstanceContainer() this.renderSettings(this.udapp)