good morning!!!!

Skip to content
Snippets Groups Projects
Commit 564b6052 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by Felix Lange
Browse files

core: ignore 0x prefix for code in JSON genesis blocks (#3656)

parent 085987ff
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment