From d91e51eadad1d4aed243cf63eeec6bdaa38008e2 Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "core: support null balance in genesis (#28005)" This reverts commit b5c26caddea19de1f23c2959cfc0c3f63437532f. --- core/genesis.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/genesis.go b/core/genesis.go index 8b5932727b..47a8ea8c7e 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -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 { @@ -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 {