diff options
Diffstat (limited to 'core/vm/runtime')
-rw-r--r-- | core/vm/runtime/env.go | 4 | ||||
-rw-r--r-- | core/vm/runtime/runtime.go | 8 | ||||
-rw-r--r-- | core/vm/runtime/runtime_test.go | 2 |
3 files changed, 3 insertions, 11 deletions
diff --git a/core/vm/runtime/env.go b/core/vm/runtime/env.go index 3cf0dd024..a25c6d71c 100644 --- a/core/vm/runtime/env.go +++ b/core/vm/runtime/env.go @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" ) -func NewEnv(cfg *Config, state *state.StateDB) *vm.Environment { +func NewEnv(cfg *Config, state *state.StateDB) *vm.EVM { context := vm.Context{ CanTransfer: core.CanTransfer, Transfer: core.Transfer, @@ -40,5 +40,5 @@ func NewEnv(cfg *Config, state *state.StateDB) *vm.Environment { GasPrice: new(big.Int), } - return vm.NewEnvironment(context, cfg.State, cfg.ChainConfig, cfg.EVMConfig) + return vm.NewEVM(context, cfg.State, cfg.ChainConfig, cfg.EVMConfig) } diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index 3e99ed689..b5adb982c 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -28,14 +28,6 @@ import ( "github.com/ethereum/go-ethereum/params" ) -// The default, always homestead, rule set for the vm env -type ruleSet struct{} - -func (ruleSet) IsHomestead(*big.Int) bool { return true } -func (ruleSet) GasTable(*big.Int) params.GasTable { - return params.GasTableHomesteadGasRepriceFork -} - // Config is a basic type specifying certain configuration flags for running // the EVM. type Config struct { diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index 88c76c731..1e618b688 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -56,7 +56,7 @@ func TestDefaults(t *testing.T) { } } -func TestEnvironment(t *testing.T) { +func TestEVM(t *testing.T) { defer func() { if r := recover(); r != nil { t.Fatalf("crashed with: %v", r) |