Merge pull request #4678 from ethereum/fix_timestamp

Fix estimateGas being not accurate
pull/4682/head
Aniket 8 months ago committed by GitHub
commit 2e62de3bca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      libs/remix-lib/src/execution/txRunnerVM.ts

@ -140,9 +140,9 @@ export class TxRunnerVM {
callback(err, result)
})
} else {
await this.getVMObject().vm.evm.journal.checkpoint()
this.runTxInVm(tx, block, async (err, result) => {
await this.getVMObject().vm.evm.journal.revert()
const root = await this.getVMObject().stateManager.getStateRoot()
this.runBlockInVm(tx, block, async (err, result) => {
await this.getVMObject().stateManager.setStateRoot(root)
callback(err, result)
})
}

Loading…
Cancel
Save