Skip to content

Commit

Permalink
blockchain_ext: remove quit chan
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Oct 24, 2024
1 parent dfa4908 commit 8da9955
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/blockchain_ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ type BlockChain struct {
// [wg] is used to wait for the async blockchain processes to finish on shutdown.
wg sync.WaitGroup

// quit channel is used to listen for when the blockchain is shut down to close
// async processes.
// WaitGroups are used to ensure that async processes have finished during shutdown.
quit chan struct{}

// [acceptorTip] is the last block processed by the acceptor. This is
// returned as the LastAcceptedBlock() to ensure clients get only fully
// processed blocks. This may be equal to [lastAccepted].
Expand Down Expand Up @@ -321,7 +316,6 @@ func NewBlockChain(
engine: engine,
vmConfig: vmConfig,
acceptorQueue: make(chan *types.Block, cacheConfig.AcceptorQueueLimit),
quit: make(chan struct{}),
acceptedLogsCache: NewFIFOCache[common.Hash, [][]*types.Log](cacheConfig.AcceptedCacheSize),
}

Expand Down Expand Up @@ -823,8 +817,6 @@ func (bc *BlockChain) stopWithoutSaving(stopInner bool) {
bc.txIndexer.close()
}

log.Info("Closing quit channel")
close(bc.quit)
// Wait for accepted feed to process all remaining items
log.Info("Stopping Acceptor")
start := time.Now()
Expand Down

0 comments on commit 8da9955

Please sign in to comment.