mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
core/vm: remove EVMInterpreter
This commit is contained in:
parent
007cae717f
commit
6ed1f53d66
2 changed files with 2 additions and 10 deletions
|
|
@ -74,7 +74,7 @@ type EVM struct {
|
||||||
vmConfig Config
|
vmConfig Config
|
||||||
// global (to this context) ethereum virtual machine
|
// global (to this context) ethereum virtual machine
|
||||||
// used throughout the execution of the tx.
|
// used throughout the execution of the tx.
|
||||||
interpreter EVMInterpreter
|
interpreter *Interpreter
|
||||||
// abort is used to abort the EVM calling operations
|
// abort is used to abort the EVM calling operations
|
||||||
// NOTE: must be set atomically
|
// NOTE: must be set atomically
|
||||||
abort int32
|
abort int32
|
||||||
|
|
@ -325,4 +325,4 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas, value *big.Int) (re
|
||||||
func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig }
|
func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig }
|
||||||
|
|
||||||
// Interpreter returns the EVM interpreter
|
// Interpreter returns the EVM interpreter
|
||||||
func (evm *EVM) Interpreter() EVMInterpreter { return evm.interpreter }
|
func (evm *EVM) Interpreter() *Interpreter { return evm.interpreter }
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EVMInterpreter is the basic interface for an implementation of the EVM.
|
|
||||||
type EVMInterpreter interface {
|
|
||||||
// Run should execute the given contract with the input given in in
|
|
||||||
// and return the contract execution return bytes or an error if it
|
|
||||||
// failed.
|
|
||||||
Run(c *Contract, in []byte) ([]byte, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateDB is an EVM database for full state querying.
|
// StateDB is an EVM database for full state querying.
|
||||||
type StateDB interface {
|
type StateDB interface {
|
||||||
GetAccount(common.Address) Account
|
GetAccount(common.Address) Account
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue