mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
chore: rename collectLogsAndReceipts to collectReceiptsAndLogs
This commit is contained in:
parent
4b926f6645
commit
9168002c47
1 changed files with 4 additions and 4 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue