mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
Indicate that Syncing FCUs are not affecting sync progress during pipeline sync (#7245)
This commit is contained in:
@@ -30,7 +30,7 @@ use tracing::{debug, info, warn};
|
||||
/// Interval of reporting node state.
|
||||
const INFO_MESSAGE_INTERVAL: Duration = Duration::from_secs(25);
|
||||
|
||||
/// The current high-level state of the node, including the node's database environemt, network
|
||||
/// The current high-level state of the node, including the node's database environment, network
|
||||
/// connections, current processing stage, and the latest block information. It provides
|
||||
/// methods to handle different types of events that affect the node's state, such as pipeline
|
||||
/// events, network events, and consensus engine events.
|
||||
@@ -219,17 +219,17 @@ impl<DB> NodeState<DB> {
|
||||
BeaconConsensusEngineEvent::ForkchoiceUpdated(state, status) => {
|
||||
let ForkchoiceState { head_block_hash, safe_block_hash, finalized_block_hash } =
|
||||
state;
|
||||
if status != ForkchoiceStatus::Valid ||
|
||||
(self.safe_block_hash != Some(safe_block_hash) &&
|
||||
self.finalized_block_hash != Some(finalized_block_hash))
|
||||
if self.safe_block_hash != Some(safe_block_hash) &&
|
||||
self.finalized_block_hash != Some(finalized_block_hash)
|
||||
{
|
||||
info!(
|
||||
?head_block_hash,
|
||||
?safe_block_hash,
|
||||
?finalized_block_hash,
|
||||
?status,
|
||||
"Forkchoice updated"
|
||||
);
|
||||
let msg = match status {
|
||||
ForkchoiceStatus::Valid => "Forkchoice updated",
|
||||
ForkchoiceStatus::Invalid => "Received invalid forkchoice updated message",
|
||||
ForkchoiceStatus::Syncing => {
|
||||
"Received forkchoice updated message when syncing"
|
||||
}
|
||||
};
|
||||
info!(?head_block_hash, ?safe_block_hash, ?finalized_block_hash, "{}", msg);
|
||||
}
|
||||
self.head_block_hash = Some(head_block_hash);
|
||||
self.safe_block_hash = Some(safe_block_hash);
|
||||
|
||||
Reference in New Issue
Block a user