mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(engine): invalid block event (#14365)
This commit is contained in:
@ -10,7 +10,7 @@ use core::{
|
||||
time::Duration,
|
||||
};
|
||||
use reth_chain_state::ExecutedBlockWithTrieUpdates;
|
||||
use reth_primitives::EthPrimitives;
|
||||
use reth_primitives::{EthPrimitives, SealedBlock};
|
||||
use reth_primitives_traits::{NodePrimitives, SealedHeader};
|
||||
|
||||
/// Events emitted by the consensus engine.
|
||||
@ -24,6 +24,8 @@ pub enum BeaconConsensusEngineEvent<N: NodePrimitives = EthPrimitives> {
|
||||
CanonicalBlockAdded(ExecutedBlockWithTrieUpdates<N>, Duration),
|
||||
/// A canonical chain was committed, and the elapsed time committing the data
|
||||
CanonicalChainCommitted(Box<SealedHeader<N::BlockHeader>>, Duration),
|
||||
/// The consensus engine processed an invalid block.
|
||||
InvalidBlock(Box<SealedBlock<N::Block>>),
|
||||
/// The consensus engine is involved in live sync, and has specific progress
|
||||
LiveSyncProgress(ConsensusEngineLiveSyncProgress),
|
||||
}
|
||||
@ -61,6 +63,9 @@ where
|
||||
Self::CanonicalChainCommitted(block, duration) => {
|
||||
write!(f, "CanonicalChainCommitted({:?}, {duration:?})", block.num_hash())
|
||||
}
|
||||
Self::InvalidBlock(block) => {
|
||||
write!(f, "InvalidBlock({:?})", block.num_hash())
|
||||
}
|
||||
Self::LiveSyncProgress(progress) => {
|
||||
write!(f, "LiveSyncProgress({progress:?})")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user