Skip to content

Commit f40180d

Browse files
committed
core/evm.go: improve comment of OverrideNewEVMArgs
- Replace `back when a new EVM is created` with `in [vm.NewEVM]` - Replace `GetCommittedState` with `[StateDbAP1.GetCommittedState]`
1 parent 7b619e9 commit f40180d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/evm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ func init() {
5050

5151
type hooks struct{}
5252

53-
// OverrideNewEVMArgs is a hook that is called back when a new EVM is created.
53+
// OverrideNewEVMArgs is a hook that is called in [vm.NewEVM].
5454
// It allows for the modification of the EVM arguments before the EVM is created.
5555
// Specifically, we set Random to be the same as Difficulty since Shanghai.
5656
// This allows using the same jump table as upstream.
5757
// Then we set Difficulty to 0 as it is post Merge in upstream.
5858
// Additionally we wrap the StateDB with the appropriate StateDB wrapper,
5959
// which is used in coreth to process historical pre-AP1 blocks with the
60-
// GetCommittedState method as it was historically.
60+
// [StateDbAP1.GetCommittedState] method as it was historically.
6161
func (hooks) OverrideNewEVMArgs(args *vm.NewEVMArgs) *vm.NewEVMArgs {
6262
rules := args.ChainConfig.Rules(args.BlockContext.BlockNumber, params.IsMergeTODO, args.BlockContext.Time)
6363
args.StateDB = wrapStateDB(rules, args.StateDB)

0 commit comments

Comments
 (0)