Skip to content

Commit

Permalink
chore: fix pruner exex height docs, add run docs (#9250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected authored Jul 3, 2024
1 parent 405b730 commit 5827c25
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/prune/prune/src/pruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ impl<DB: Database> Pruner<DB> {
self.event_sender.new_listener()
}

/// Run the pruner
/// Run the pruner. This will only prune data up to the highest finished `ExEx` height, if there
/// are no `ExEx`s, .
///
/// Returns a [`PruneProgress`], indicating whether pruning is finished, or there is more data
/// to prune.
pub fn run(&mut self, tip_block_number: BlockNumber) -> PrunerResult {
let Some(tip_block_number) =
self.adjust_tip_block_number_to_finished_exex_height(tip_block_number)
Expand Down Expand Up @@ -306,8 +310,8 @@ impl<DB: Database> Pruner<DB> {

/// Adjusts the tip block number to the finished `ExEx` height. This is needed to not prune more
/// data than `ExExs` have processed. Depending on the height:
/// - [`FinishedExExHeight::NoExExs`] returns the tip block number as is as no adjustment for
/// `ExExs` is needed.
/// - [`FinishedExExHeight::NoExExs`] returns the tip block number as no adjustment for `ExExs`
/// is needed.
/// - [`FinishedExExHeight::NotReady`] returns `None` as not all `ExExs` have emitted a
/// `FinishedHeight` event yet.
/// - [`FinishedExExHeight::Height`] returns the finished `ExEx` height.
Expand Down

0 comments on commit 5827c25

Please sign in to comment.