diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-10-01 20:44:53 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-10-03 16:24:04 +0800 |
commit | f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad (patch) | |
tree | d00977eccdd2b5f618765f5a65bf7f63a080e25e /light | |
parent | 968ab8aa4f85649f94352565ac43eb6fe56312ce (diff) | |
download | go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar.gz go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar.bz2 go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar.lz go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar.xz go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.tar.zst go-tangerine-f1949f4d996933dcfbbb17dc8c1e8ad4d07313ad.zip |
[release/1.4.15] cmd, core, internal, light, tests: avoid hashing the code in the VM
(cherry picked from commit cb84e3f02953f2df166ae69369d222dcbbd7d78d)
Diffstat (limited to 'light')
-rw-r--r-- | light/state_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/light/state_test.go b/light/state_test.go index d7014a2dc..d4fe95022 100644 --- a/light/state_test.go +++ b/light/state_test.go @@ -23,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/trie" "golang.org/x/net/context" @@ -60,7 +61,7 @@ func makeTestState() (common.Hash, ethdb.Database) { so.SetNonce(100) } so.AddBalance(big.NewInt(int64(i))) - so.SetCode([]byte{i, i, i}) + so.SetCode(crypto.Keccak256Hash([]byte{i, i, i}), []byte{i, i, i}) so.UpdateRoot(sdb) st.UpdateStateObject(so) } |