From d6d789368cb61adf8cc4c128e690883e630e0a2c Mon Sep 17 00:00:00 2001 From: David Zhou Date: Fri, 23 May 2025 11:50:56 -0400 Subject: [PATCH] DOC: Some comments --- eth/tracers/firehose.go | 1 + eth/tracers/firehose_concurrency.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/eth/tracers/firehose.go b/eth/tracers/firehose.go index 09e75066f4..da2e96eb30 100644 --- a/eth/tracers/firehose.go +++ b/eth/tracers/firehose.go @@ -375,6 +375,7 @@ func (f *Firehose) OnBlockchainInit(chainConfig *params.ChainConfig) { } if f.config.ConcurrentBlockFlushing > 0 { + log.Info("Firehose concurrent block flushing enabled, starting goroutines") f.BlockFlushQueue = NewBlockFlushQueue( f.config.ConcurrentBlockFlushing, f.blockFlushBufferSize, diff --git a/eth/tracers/firehose_concurrency.go b/eth/tracers/firehose_concurrency.go index 430000fc7d..39d5183462 100644 --- a/eth/tracers/firehose_concurrency.go +++ b/eth/tracers/firehose_concurrency.go @@ -78,6 +78,7 @@ func (q *BlockFlushQueue) Close() { }) } +// Instantiates a worker that listens for jobs func (q *BlockFlushQueue) worker() { defer q.jobWG.Done() for job := range q.jobQueue { @@ -85,6 +86,7 @@ func (q *BlockFlushQueue) worker() { } } +// Channel ensuring that blocks are linearly flushed out in order func (q *BlockFlushQueue) outputOrderer() { defer q.outputWG.Done() buffer := make(map[uint64][]byte)