diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-13 17:30:52 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-13 17:30:52 +0800 |
commit | 4704a0a288af89795e251db98eb253de117ff031 (patch) | |
tree | d6e975352b20a3c23a6af453c45b87b1e2d976ae /tests/helper | |
parent | 5b561f434d888b750bb9b29726a86d664ac89660 (diff) | |
download | go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.gz go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.zst go-tangerine-4704a0a288af89795e251db98eb253de117ff031.zip |
remove pre compiled for tests
Diffstat (limited to 'tests/helper')
-rw-r--r-- | tests/helper/vm.go | 5 |
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"])) |