remove unused checkpointAndCommit

pull/5370/head
yann300 5 years ago
parent cda67568c7
commit 7f75f7d55e
  1. 14
      remix-lib/src/execution/execution-context.js
  2. 6
      remix-simulator/src/genesis.js

@ -238,20 +238,6 @@ function ExecutionContext () {
}
}
this.checkpointAndCommit = function (cb, checkpointCount) {
// due to issue https://github.com/ethereumjs/ethereumjs-vm/issues/567
if (this.vm().stateManager._checkpointCount > (checkpointCount || 0)) {
return this.vm().stateManager.commit(() => {
cb()
})
}
this.vm().stateManager.checkpoint(() => {
this.vm().stateManager.commit(() => {
cb()
})
})
}
this.currentblockGasLimit = function () {
return this.blockGasLimit
}

@ -17,10 +17,8 @@ function generateBlock () {
uncleHeaders: []
})
executionContext.checkpointAndCommit(() => {
executionContext.vm().runBlock({ block: block, generate: true, skipBlockValidation: true, skipBalance: false }, function () {
executionContext.addBlock(block)
})
executionContext.vm().runBlock({ block: block, generate: true, skipBlockValidation: true, skipBalance: false }, function () {
executionContext.addBlock(block)
})
}

Loading…
Cancel
Save