mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: stage eta (#3135)
This commit is contained in:
@ -216,6 +216,29 @@ impl StageCheckpoint {
|
||||
self.block_number = block_number;
|
||||
self
|
||||
}
|
||||
|
||||
/// Get the underlying [`EntitiesCheckpoint`] to determine the number of entities processed, and
|
||||
/// the number of total entities to process.
|
||||
pub fn entities(&self) -> EntitiesCheckpoint {
|
||||
match self.stage_checkpoint {
|
||||
Some(
|
||||
StageUnitCheckpoint::Account(AccountHashingCheckpoint {
|
||||
progress: entities, ..
|
||||
}) |
|
||||
StageUnitCheckpoint::Storage(StorageHashingCheckpoint {
|
||||
progress: entities, ..
|
||||
}) |
|
||||
StageUnitCheckpoint::Entities(entities) |
|
||||
StageUnitCheckpoint::Execution(ExecutionCheckpoint { progress: entities, .. }) |
|
||||
StageUnitCheckpoint::Headers(HeadersCheckpoint { progress: entities, .. }) |
|
||||
StageUnitCheckpoint::IndexHistory(IndexHistoryCheckpoint {
|
||||
progress: entities,
|
||||
..
|
||||
}),
|
||||
) => entities,
|
||||
None => EntitiesCheckpoint::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for StageCheckpoint {
|
||||
|
||||
@ -355,7 +355,7 @@ where
|
||||
Ok(out @ ExecOutput { checkpoint, done }) => {
|
||||
made_progress |=
|
||||
checkpoint.block_number != prev_checkpoint.unwrap_or_default().block_number;
|
||||
info!(
|
||||
debug!(
|
||||
target: "sync::pipeline",
|
||||
stage = %stage_id,
|
||||
progress = checkpoint.block_number,
|
||||
|
||||
Reference in New Issue
Block a user