mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(bin): calculate ETA only if EntitiesCheckpoint is present (#3206)
This commit is contained in:
@ -278,9 +278,9 @@ struct Eta {
|
||||
}
|
||||
|
||||
impl Eta {
|
||||
/// Update the ETA given the checkpoint.
|
||||
/// Update the ETA given the checkpoint, if possible.
|
||||
fn update(&mut self, checkpoint: StageCheckpoint) {
|
||||
let current = checkpoint.entities();
|
||||
let Some(current) = checkpoint.entities() else { return };
|
||||
|
||||
if let Some(last_checkpoint_time) = &self.last_checkpoint_time {
|
||||
let processed_since_last = current.processed - self.last_checkpoint.processed;
|
||||
|
||||
Reference in New Issue
Block a user