mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(engine): track elapsed on fork block added (#10710)
This commit is contained in:
@ -8,14 +8,14 @@ use std::{sync::Arc, time::Duration};
|
||||
pub enum BeaconConsensusEngineEvent {
|
||||
/// The fork choice state was updated, and the current fork choice status
|
||||
ForkchoiceUpdated(ForkchoiceState, ForkchoiceStatus),
|
||||
/// A block was added to the fork chain.
|
||||
ForkBlockAdded(Arc<SealedBlock>, Duration),
|
||||
/// A block was added to the canonical chain, and the elapsed time validating the block
|
||||
CanonicalBlockAdded(Arc<SealedBlock>, Duration),
|
||||
/// A canonical chain was committed, and the elapsed time committing the data
|
||||
CanonicalChainCommitted(Box<SealedHeader>, Duration),
|
||||
/// The consensus engine is involved in live sync, and has specific progress
|
||||
LiveSyncProgress(ConsensusEngineLiveSyncProgress),
|
||||
/// A block was added to the fork chain.
|
||||
ForkBlockAdded(Arc<SealedBlock>),
|
||||
}
|
||||
|
||||
impl BeaconConsensusEngineEvent {
|
||||
|
||||
@ -1244,7 +1244,7 @@ where
|
||||
let event = if attachment.is_canonical() {
|
||||
BeaconConsensusEngineEvent::CanonicalBlockAdded(block, elapsed)
|
||||
} else {
|
||||
BeaconConsensusEngineEvent::ForkBlockAdded(block)
|
||||
BeaconConsensusEngineEvent::ForkBlockAdded(block, elapsed)
|
||||
};
|
||||
self.event_sender.notify(event);
|
||||
PayloadStatusEnum::Valid
|
||||
|
||||
Reference in New Issue
Block a user