From f862531c250fed8e2912a9a1d7ccdc075377cf83 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 5 Dec 2023 16:49:03 +0330 Subject: [PATCH] rm chainConfig from OnGenesisBlock --- core/blockchain.go | 4 ++-- core/genesis.go | 2 +- eth/tracers/live/printer.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 5bc5bbd68d..e7ba251c8f 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -194,7 +194,7 @@ type BlockchainLogger interface { // `td` is the total difficulty prior to `block`. OnBlockStart(block *types.Block, td *big.Int, finalized *types.Header, safe *types.Header, chainConfig *params.ChainConfig) OnBlockEnd(err error) - OnGenesisBlock(genesis *types.Block, alloc GenesisAlloc, chainConfig *params.ChainConfig) + OnGenesisBlock(genesis *types.Block, alloc GenesisAlloc) OnBeaconBlockRootStart(root common.Hash) OnBeaconBlockRootEnd() } @@ -461,7 +461,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis return nil, fmt.Errorf("live blockchain tracer requires genesis alloc to be set") } - bc.logger.OnGenesisBlock(bc.genesisBlock, alloc, bc.chainConfig) + bc.logger.OnGenesisBlock(bc.genesisBlock, alloc) } } diff --git a/core/genesis.go b/core/genesis.go index cd62eebd95..ed2f1eb503 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -540,7 +540,7 @@ func (g *Genesis) Commit(db ethdb.Database, triedb *trie.Database, bcLogger Bloc return nil, errors.New("can't start clique chain without signers") } if bcLogger != nil { - bcLogger.OnGenesisBlock(block, g.Alloc, config) + bcLogger.OnGenesisBlock(block, g.Alloc) } // All the checks has passed, flush the states derived from the genesis // specification as well as the specification itself into the provided diff --git a/eth/tracers/live/printer.go b/eth/tracers/live/printer.go index 58022b3903..422b009e29 100644 --- a/eth/tracers/live/printer.go +++ b/eth/tracers/live/printer.go @@ -97,7 +97,7 @@ func (p *Printer) OnBlockEnd(err error) { fmt.Printf("OnBlockEnd: err=%v\n", err) } -func (p *Printer) OnGenesisBlock(b *types.Block, alloc core.GenesisAlloc, _ *params.ChainConfig) { +func (p *Printer) OnGenesisBlock(b *types.Block, alloc core.GenesisAlloc) { fmt.Printf("OnGenesisBlock: b=%v, allocLength=%d\n", b.NumberU64(), len(alloc)) }