aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-02-13 10:36:50 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-02-13 10:36:50 +0800
commit564b60520c68a1f06171abd705c01946b932492f (patch)
tree1bd9a59ab48a6a44ca833fbf2e14151b91fb7165 /core
parent085987ff2cb1695881a3d0abeebbc21a4c51a2de (diff)
downloaddexon-564b60520c68a1f06171abd705c01946b932492f.tar.gz
dexon-564b60520c68a1f06171abd705c01946b932492f.tar.zst
dexon-564b60520c68a1f06171abd705c01946b932492f.zip
core: ignore 0x prefix for code in JSON genesis blocks (#3656)
Diffstat (limited to 'core')
-rw-r--r--core/genesis.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/genesis.go b/core/genesis.go
index a06c40408..b94b5af76 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -70,7 +70,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
for addr, account := range genesis.Alloc {
address := common.HexToAddress(addr)
statedb.AddBalance(address, common.String2Big(account.Balance))
- statedb.SetCode(address, common.Hex2Bytes(account.Code))
+ statedb.SetCode(address, common.FromHex(account.Code))
statedb.SetNonce(address, common.String2Big(account.Nonce).Uint64())
for key, value := range account.Storage {
statedb.SetState(address, common.HexToHash(key), common.HexToHash(value))