Skip to content

Commit

Permalink
Revert "core: support null balance in genesis (ethereum#28005)"
Browse files Browse the repository at this point in the history
This reverts commit b5c26ca.
  • Loading branch information
devopsbo3 authored Nov 10, 2023
1 parent dac3cc9 commit d91e51e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ func (ga *GenesisAlloc) deriveHash() (common.Hash, error) {
return common.Hash{}, err
}
for addr, account := range *ga {
if account.Balance != nil {
statedb.AddBalance(addr, account.Balance)
}
statedb.AddBalance(addr, account.Balance)
statedb.SetCode(addr, account.Code)
statedb.SetNonce(addr, account.Nonce)
for key, value := range account.Storage {
Expand All @@ -151,9 +149,7 @@ func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhas
return err
}
for addr, account := range *ga {
if account.Balance != nil {
statedb.AddBalance(addr, account.Balance)
}
statedb.AddBalance(addr, account.Balance)
statedb.SetCode(addr, account.Code)
statedb.SetNonce(addr, account.Nonce)
for key, value := range account.Storage {
Expand Down

0 comments on commit d91e51e

Please sign in to comment.