Skip to content
Merged
Changes from 1 commit
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: 10 additions & 0 deletions src/rpc/methods/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,16 @@ impl ChainGetTipSetFinalityStatus {
find_threshold_depth,
};

/// Number of extra epochs to fetch beyond [`chain_finality`] when
/// building the chain sample for [`find_threshold_depth`].
///
/// [`find_threshold_depth`] probes epoch depths up to `chain_finality`
/// using a bisect search over the sampled chain slice. The extra epochs
/// provide a small tail buffer so that the bisect can safely evaluate
/// entries at the very edge of the finality window without reading past
/// the end of the slice — particularly important when null rounds (epochs
/// with zero blocks) are present, since they consume slots in the vector
/// without advancing the meaningful epoch count.
const FINALITY_CHAIN_EXTRA_EPOCHS: usize = 5;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

let finality = ctx.chain_config().policy.chain_finality;
Expand Down
Loading