From f2f6b518dd273ffa44296214d3fc4fe1208fb0cd Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Wed, 20 Sep 2023 09:13:17 -0400 Subject: [PATCH] Fixed genesis on database bootstrap being emitted while it should not --- core/genesis.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/genesis.go b/core/genesis.go index 18550b89c833..9e49313083c3 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -260,9 +260,13 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block { if db == nil { db = rawdb.NewMemoryDatabase() } + + // Firehose: We do not log those as we are going to trace the genesis block on Blockchain start, so there is no + // need to log the genesis block creation. + statedb, _ := state.New(common.Hash{}, state.NewDatabase(db), nil) for addr, account := range g.Alloc { - statedb.AddBalance(addr, account.Balance, false, firehose.NoOpContext, firehose.BalanceChangeReason("genesis_balance")) + statedb.AddBalance(addr, account.Balance, false, firehose.NoOpContext, firehose.IgnoredBalanceChangeReason) statedb.SetCode(addr, account.Code, firehose.NoOpContext) statedb.SetNonce(addr, account.Nonce, firehose.NoOpContext) for key, value := range account.Storage {