Skip to content

Commit

Permalink
refactor(prune): impl Segment for other prune segments (#4899)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored and mattsse committed Nov 8, 2023
1 parent 6b1c17a commit f35873d
Show file tree
Hide file tree
Showing 14 changed files with 1,459 additions and 1,470 deletions.
4 changes: 2 additions & 2 deletions bin/reth/src/node/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ impl NodeState {

fn handle_pruner_event(&self, event: PrunerEvent) {
match event {
PrunerEvent::Finished { tip_block_number, elapsed, segments } => {
info!(tip_block_number, ?elapsed, ?segments, "Pruner finished");
PrunerEvent::Finished { tip_block_number, elapsed, stats } => {
info!(tip_block_number, ?elapsed, ?stats, "Pruner finished");
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions crates/primitives/src/prune/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,4 @@ impl PruneProgress {
Self::HasMoreData
}
}

/// Returns `true` if pruning has been finished.
pub fn is_finished(&self) -> bool {
matches!(self, Self::Finished)
}
}
2 changes: 1 addition & 1 deletion crates/prune/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ pub enum PrunerEvent {
Finished {
tip_block_number: BlockNumber,
elapsed: Duration,
segments: BTreeMap<PruneSegment, (PruneProgress, usize)>,
stats: BTreeMap<PruneSegment, (PruneProgress, usize)>,
},
}
Loading

0 comments on commit f35873d

Please sign in to comment.