Skip to content

Commit

Permalink
core/vm: Allow using EVMC also as an EVM
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Oct 26, 2018
1 parent b2d49c7 commit 3f221d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ func NewEVM(ctx Context, statedb StateDB, chainConfig *params.ChainConfig, vmCon
}
}

// vmConfig.EVMInterpreter will be used by EVM-C, it won't be checked here
// as we always want to have the built-in EVM as the failover option.
if vmConfig.EVMInterpreter != "" {
// Create custom EVM.
evm.interpreters = append(evm.interpreters, NewEVMC(vmConfig.EVMInterpreter, evm))
}

// Keep the built-in EVM as the failover option.
evm.interpreters = append(evm.interpreters, NewEVMInterpreter(evm, vmConfig))

return evm
Expand Down

0 comments on commit 3f221d6

Please sign in to comment.