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/database_util_test.go | |
parent | 4f4d2b647488eaa056613fa6f026229ac91f066a (diff) | |
download | go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.gz go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.bz2 go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.lz go-tangerine-b6d88a0e9f9aaeb47d585d79c768d457b545af90.tar.xz 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/database_util_test.go')
-rw-r--r-- | core/database_util_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/database_util_test.go b/core/database_util_test.go index 059f1ae9f..6b3793635 100644 --- a/core/database_util_test.go +++ b/core/database_util_test.go @@ -62,7 +62,7 @@ func (d *diffTest) UnmarshalJSON(b []byte) (err error) { return nil } -func TestDifficulty(t *testing.T) { +func TestDifficultyFrontier(t *testing.T) { file, err := os.Open("../tests/files/BasicTests/difficulty.json") if err != nil { t.Fatal(err) @@ -77,7 +77,7 @@ func TestDifficulty(t *testing.T) { for name, test := range tests { number := new(big.Int).Sub(test.CurrentBlocknumber, big.NewInt(1)) - diff := CalcDifficulty(test.CurrentTimestamp, test.ParentTimestamp, number, test.ParentDifficulty) + diff := calcDifficultyFrontier(test.CurrentTimestamp, test.ParentTimestamp, number, test.ParentDifficulty) if diff.Cmp(test.CurrentDifficulty) != 0 { t.Error(name, "failed. Expected", test.CurrentDifficulty, "and calculated", diff) } |