|
|
@ -130,7 +130,9 @@ func (ga *GenesisAlloc) deriveHash() (common.Hash, error) { |
|
|
|
return common.Hash{}, err |
|
|
|
return common.Hash{}, err |
|
|
|
} |
|
|
|
} |
|
|
|
for addr, account := range *ga { |
|
|
|
for addr, account := range *ga { |
|
|
|
statedb.AddBalance(addr, account.Balance) |
|
|
|
if account.Balance != nil { |
|
|
|
|
|
|
|
statedb.AddBalance(addr, account.Balance) |
|
|
|
|
|
|
|
} |
|
|
|
statedb.SetCode(addr, account.Code) |
|
|
|
statedb.SetCode(addr, account.Code) |
|
|
|
statedb.SetNonce(addr, account.Nonce) |
|
|
|
statedb.SetNonce(addr, account.Nonce) |
|
|
|
for key, value := range account.Storage { |
|
|
|
for key, value := range account.Storage { |
|
|
@ -149,7 +151,9 @@ func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhas |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
for addr, account := range *ga { |
|
|
|
for addr, account := range *ga { |
|
|
|
statedb.AddBalance(addr, account.Balance) |
|
|
|
if account.Balance != nil { |
|
|
|
|
|
|
|
statedb.AddBalance(addr, account.Balance) |
|
|
|
|
|
|
|
} |
|
|
|
statedb.SetCode(addr, account.Code) |
|
|
|
statedb.SetCode(addr, account.Code) |
|
|
|
statedb.SetNonce(addr, account.Nonce) |
|
|
|
statedb.SetNonce(addr, account.Nonce) |
|
|
|
for key, value := range account.Storage { |
|
|
|
for key, value := range account.Storage { |
|
|
|