diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-01-20 06:50:00 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-02-18 17:11:48 +0800 |
commit | b6d88a0e9f9aaeb47d585d79c768d457b545af90 (patch) | |
tree | 49e667cd929ce6b561961ac741d9ff0f82e61261 /core/vm/jump_table_test.go | |
parent | 4f4d2b647488eaa056613fa6f026229ac91f066a (diff) | |
download | go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.gz go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.zst go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.zip |
core, core/vm, crypto: fixes for homestead
* Removed some strange code that didn't apply state reverting properly
* Refactored code setting from vm & state transition to the executioner
* Updated tests
Diffstat (limited to 'core/vm/jump_table_test.go')
-rw-r--r-- | core/vm/jump_table_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/vm/jump_table_test.go b/core/vm/jump_table_test.go new file mode 100644 index 000000000..98d34bef2 --- /dev/null +++ b/core/vm/jump_table_test.go @@ -0,0 +1,24 @@ +package vm + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/params" +) + +func TestInit(t *testing.T) { + params.HomesteadBlock = big.NewInt(1) + + jumpTable.init(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)) + if !jumpTable[DELEGATECALL].valid { + t.Error("Expected DELEGATECALL to be present for block", n) + } + } +} |