aboutsummaryrefslogtreecommitdiffstats
path: root/light
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-10-01 21:58:49 +0800
committerGitHub <noreply@github.com>2016-10-01 21:58:49 +0800
commit0731b44809f72ed5880dc3654ee70ae85420bd77 (patch)
tree68eb52c91a136e820f3656e394847c4e695afa63 /light
parentd8715fba1a366944a069397775fc52a30358eff3 (diff)
parentcb84e3f02953f2df166ae69369d222dcbbd7d78d (diff)
downloaddexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar.gz
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar.bz2
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar.lz
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar.xz
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.tar.zst
dexon-0731b44809f72ed5880dc3654ee70ae85420bd77.zip
Merge pull request #3067 from karalabe/vm-avoid-hashing
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)
}