diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-01-21 22:29:58 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-03-23 07:04:00 +0800 |
commit | 342ae7ce7dfd7a0eab2dd06bfa65199825279f05 (patch) | |
tree | 4d90314e50e137bcd8ee837cbb396fee40e2bb4b /core/vm/jump_table_test.go | |
parent | 2855a93ede6e9437d05a82c2397d48744621db9b (diff) | |
download | dexon-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.tar.gz dexon-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.tar.zst dexon-342ae7ce7dfd7a0eab2dd06bfa65199825279f05.zip |
core, core/vm, tests: changed the initialisation behaviour of the EVM
The EVM was previously initialised and created for every CALL, CALLCODE,
DELEGATECALL and CREATE. This PR changes this behaviour so that the same
EVM can be used through the session and beyond as long as the
Environment sticks around.
Diffstat (limited to 'core/vm/jump_table_test.go')
-rw-r--r-- | core/vm/jump_table_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/vm/jump_table_test.go b/core/vm/jump_table_test.go index 98d34bef2..2ed1b26fc 100644 --- a/core/vm/jump_table_test.go +++ b/core/vm/jump_table_test.go @@ -10,13 +10,13 @@ import ( func TestInit(t *testing.T) { params.HomesteadBlock = big.NewInt(1) - jumpTable.init(big.NewInt(0)) + jumpTable := newJumpTable(big.NewInt(0)) if jumpTable[DELEGATECALL].valid { t.Error("Expected DELEGATECALL not to be present") } for _, n := range []int64{1, 2, 100} { - jumpTable.init(big.NewInt(n)) + jumpTable := newJumpTable(big.NewInt(n)) if !jumpTable[DELEGATECALL].valid { t.Error("Expected DELEGATECALL to be present for block", n) } |