Skip to content

Commit 3f221d6

Browse files
committed
core/vm: Allow using EVMC also as an EVM
1 parent b2d49c7 commit 3f221d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/vm/evm.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,12 @@ func NewEVM(ctx Context, statedb StateDB, chainConfig *params.ChainConfig, vmCon
147147
}
148148
}
149149

150-
// vmConfig.EVMInterpreter will be used by EVM-C, it won't be checked here
151-
// as we always want to have the built-in EVM as the failover option.
150+
if vmConfig.EVMInterpreter != "" {
151+
// Create custom EVM.
152+
evm.interpreters = append(evm.interpreters, NewEVMC(vmConfig.EVMInterpreter, evm))
153+
}
154+
155+
// Keep the built-in EVM as the failover option.
152156
evm.interpreters = append(evm.interpreters, NewEVMInterpreter(evm, vmConfig))
153157

154158
return evm

0 commit comments

Comments
 (0)