Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
keep receipts cache
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Nov 1, 2023
1 parent 13594da commit cb37dfa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eth/core/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func (bc *blockchain) WriteBlockAndSetHead(
)
}

// Write the receipts cache.
// TODO deprecate this cache?
if receipts != nil {
bc.receiptsCache.Add(block.Hash(), receipts)
}

// Fire off the feeds.
bc.chainFeed.Send(ChainEvent{Block: block, Hash: block.Hash(), Logs: logs})
if len(logs) > 0 {
Expand Down

0 comments on commit cb37dfa

Please sign in to comment.