DOC: Some comments

This commit is contained in:
David Zhou 2025-05-23 11:50:56 -04:00
parent a904b71a82
commit d6d789368c
2 changed files with 3 additions and 0 deletions

View file

@ -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,

View file

@ -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)