mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
chore(node-core): add stage id to eta overflow log (#6991)
This commit is contained in:
@@ -117,7 +117,7 @@ impl<DB> NodeState<DB> {
|
||||
|
||||
if let Some(current_stage) = self.current_stage.as_mut() {
|
||||
current_stage.checkpoint = checkpoint;
|
||||
current_stage.eta.update(checkpoint);
|
||||
current_stage.eta.update(stage_id, checkpoint);
|
||||
|
||||
let target = OptionalField(current_stage.target);
|
||||
let stage_progress = OptionalField(
|
||||
@@ -479,7 +479,7 @@ struct Eta {
|
||||
|
||||
impl Eta {
|
||||
/// Update the ETA given the checkpoint, if possible.
|
||||
fn update(&mut self, checkpoint: StageCheckpoint) {
|
||||
fn update(&mut self, stage: StageId, checkpoint: StageCheckpoint) {
|
||||
let Some(current) = checkpoint.entities() else { return };
|
||||
|
||||
if let Some(last_checkpoint_time) = &self.last_checkpoint_time {
|
||||
@@ -487,7 +487,7 @@ impl Eta {
|
||||
current.processed.checked_sub(self.last_checkpoint.processed)
|
||||
else {
|
||||
self.eta = None;
|
||||
debug!(target: "reth::cli", ?current, ?self.last_checkpoint, "Failed to calculate the ETA: processed entities is less than the last checkpoint");
|
||||
debug!(target: "reth::cli", %stage, ?current, ?self.last_checkpoint, "Failed to calculate the ETA: processed entities is less than the last checkpoint");
|
||||
return
|
||||
};
|
||||
let elapsed = last_checkpoint_time.elapsed();
|
||||
@@ -495,7 +495,7 @@ impl Eta {
|
||||
|
||||
let Some(remaining) = current.total.checked_sub(current.processed) else {
|
||||
self.eta = None;
|
||||
debug!(target: "reth::cli", ?current, "Failed to calculate the ETA: total entities is less than processed entities");
|
||||
debug!(target: "reth::cli", %stage, ?current, "Failed to calculate the ETA: total entities is less than processed entities");
|
||||
return
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user