aboutsummaryrefslogtreecommitdiffstats
path: root/light
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-01 20:44:53 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-10-01 21:01:58 +0800
commitcb84e3f02953f2df166ae69369d222dcbbd7d78d (patch)
tree68eb52c91a136e820f3656e394847c4e695afa63 /light
parentd8715fba1a366944a069397775fc52a30358eff3 (diff)
downloaddexon-cb84e3f02953f2df166ae69369d222dcbbd7d78d.tar.gz
dexon-cb84e3f02953f2df166ae69369d222dcbbd7d78d.tar.zst
dexon-cb84e3f02953f2df166ae69369d222dcbbd7d78d.zip
cmd, core, internal, light, tests: avoid hashing the code in the VM
Diffstat (limited to 'light')
-rw-r--r--light/state_test.go3
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)
}