From 5190cfc5cb24493311fb5724361dd3c519fa66f8 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 5 Dec 2023 14:16:25 +0330 Subject: [PATCH] rm extra galloc capturing --- core/genesis.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/genesis.go b/core/genesis.go index 81efbd314b..ed2f1eb503 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -158,12 +158,13 @@ func (ga *GenesisAlloc) hash(isVerkle bool) (common.Hash, error) { // specification will be flushed as well. func (ga *GenesisAlloc) flush(db ethdb.Database, triedb *trie.Database, blockhash common.Hash, bcLogger BlockchainLogger) error { statedb, err := state.New(types.EmptyRootHash, state.NewDatabaseWithNodeDB(db, triedb), nil) - statedb.SetLogger(bcLogger) if err != nil { return err } for addr, account := range *ga { if account.Balance != nil { + // This is not actually logged via tracer because OnGenesisBlock + // already captures the allocations. statedb.AddBalance(addr, account.Balance, state.BalanceChangeGenesisBalance) } statedb.SetCode(addr, account.Code)