aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helper/vm.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helper/vm.go')
-rw-r--r--tests/helper/vm.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/helper/vm.go b/tests/helper/vm.go
index 2f3ec30f7..7c33839cf 100644
--- a/tests/helper/vm.go
+++ b/tests/helper/vm.go
@@ -116,6 +116,8 @@ func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Log
price = ethutil.Big(exec["gasPrice"])
value = ethutil.Big(exec["value"])
)
+ // Reset the pre-compiled contracts for VM tests.
+ vm.Precompiled = make(map[string]*vm.PrecompiledAccount)
caller := state.GetOrNewStateObject(from)
@@ -138,6 +140,9 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
caddr = FromHex(env["currentCoinbase"])
)
+ // Set pre compiled contracts
+ vm.Precompiled = vm.PrecompiledContracts()
+
coinbase := statedb.GetOrNewStateObject(caddr)
coinbase.SetGasPool(ethutil.Big(env["currentGasLimit"]))