remove unused checkpointAndCommit

pull/5370/head
yann300 5 years ago
parent cda67568c7
commit 7f75f7d55e
  1. 14
      remix-lib/src/execution/execution-context.js
  2. 2
      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 () { this.currentblockGasLimit = function () {
return this.blockGasLimit return this.blockGasLimit
} }

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

Loading…
Cancel
Save