Skip to content

Commit

Permalink
Merge pull request ethereum#4678 from ethereum/fix_timestamp
Browse files Browse the repository at this point in the history
Fix estimateGas being not accurate
  • Loading branch information
Aniket-Engg authored Apr 3, 2024
2 parents a736967 + ca23719 commit 2e62de3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/remix-lib/src/execution/txRunnerVM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down

0 comments on commit 2e62de3

Please sign in to comment.