From 564b60520c68a1f06171abd705c01946b932492f Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 13 Feb 2017 03:36:50 +0100 Subject: core: ignore 0x prefix for code in JSON genesis blocks (#3656) --- core/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') 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)) -- cgit v1.2.3