sc-consensus-beefy: restart voter on pallet reset (#14821)

When detecting pallet-beefy consensus reset, just reinitialize the worker
and continue without bringing down the task (and possibly the node).

Signed-off-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
Adrian Catangiu authored and GitHub committed 2023-08-25 09:51:44 +02:00
1 parent 3710edfedc
commit 32541bde15
7 files changed
+129 -101

No files matched your search

+11 -1
View File
@@ -34,8 +34,18 @@ pub enum Error {
Signature(String),
#[error("Session uninitialized")]
UninitSession,
#[error("pallet-beefy was reset, please restart voter")]
#[error("pallet-beefy was reset")]
ConsensusReset,
#[error("Block import stream terminated")]
BlockImportStreamTerminated,
#[error("Gossip Engine terminated")]
GossipEngineTerminated,
#[error("Finality proofs gossiping stream terminated")]
FinalityProofGossipStreamTerminated,
#[error("Finality stream terminated")]
FinalityStreamTerminated,
#[error("Votes gossiping stream terminated")]
VotesGossipStreamTerminated,
}
#[cfg(test)]