remove pre compiled for tests

This commit is contained in:
obscuren
2015-01-13 10:30:52 +01:00
parent 5b561f434d
commit 4704a0a288
3 changed files with 37 additions and 28 deletions

View File

@ -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"]))