From 9168002c47b99c0f0b3ccd8e14ea88428259b88a Mon Sep 17 00:00:00 2001 From: 10gic Date: Tue, 30 Sep 2025 14:11:39 +0800 Subject: [PATCH] chore: rename collectLogsAndReceipts to collectReceiptsAndLogs --- core/blockchain.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index c74fe56efd..c74168d82d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2347,13 +2347,13 @@ func (bc *BlockChain) recoverAncestors(block *types.Block, makeWitness bool) (co // collectLogs collects the logs that were generated or removed during the // processing of a block. These logs are later announced as deleted or reborn. func (bc *BlockChain) collectLogs(b *types.Block, removed bool) []*types.Log { - _, logs := bc.collectLogsAndReceipts(b, removed) + _, logs := bc.collectReceiptsAndLogs(b, removed) return logs } -// collectLogsAndReceipts retrieves receipts from the database and returns both receipts and logs. +// collectReceiptsAndLogs retrieves receipts from the database and returns both receipts and logs. // This avoids duplicate database reads when both are needed. -func (bc *BlockChain) collectLogsAndReceipts(b *types.Block, removed bool) ([]*types.Receipt, []*types.Log) { +func (bc *BlockChain) collectReceiptsAndLogs(b *types.Block, removed bool) ([]*types.Receipt, []*types.Log) { var blobGasPrice *big.Int if b.ExcessBlobGas() != nil { blobGasPrice = eip4844.CalcBlobFee(bc.chainConfig, b.Header()) @@ -2600,7 +2600,7 @@ func (bc *BlockChain) SetCanonical(head *types.Block) (common.Hash, error) { bc.writeHeadBlock(head) // Emit events - receipts, logs := bc.collectLogsAndReceipts(head, false) + receipts, logs := bc.collectReceiptsAndLogs(head, false) bc.chainFeed.Send(ChainEvent{ Header: head.Header(),