diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index 8e1b5ad32..d9963d2c4 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -332,14 +332,18 @@ events: default: } } -drainBlocksLoop: +drainLoop: for { select { + case <-s.messages: + case <-s.transactions: case <-s.blockEvents: default: - break drainBlocksLoop + break drainLoop } } + close(s.messages) + close(s.transactions) close(s.blockEvents) close(s.finished) }