Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix pruner exex height docs, add run docs #9250

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading