Skip to content

Commit 564b605

Browse files
holimanfjl
authored andcommitted
core: ignore 0x prefix for code in JSON genesis blocks (ethereum#3656)
1 parent 085987f commit 564b605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func WriteGenesisBlock(chainDb ethdb.Database, reader io.Reader) (*types.Block,
7070
for addr, account := range genesis.Alloc {
7171
address := common.HexToAddress(addr)
7272
statedb.AddBalance(address, common.String2Big(account.Balance))
73-
statedb.SetCode(address, common.Hex2Bytes(account.Code))
73+
statedb.SetCode(address, common.FromHex(account.Code))
7474
statedb.SetNonce(address, common.String2Big(account.Nonce).Uint64())
7575
for key, value := range account.Storage {
7676
statedb.SetState(address, common.HexToHash(key), common.HexToHash(value))

0 commit comments

Comments
 (0)