Skip to content

Commit

Permalink
docs describing FinalizationHandler<BatchOfUnits<...>> in `run_sess…
Browse files Browse the repository at this point in the history
…ion`
  • Loading branch information
fixxxedpoint committed Apr 23, 2024
1 parent 35289f5 commit a56156c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion consensus/src/member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl<DP: DataProvider, FH: FinalizationHandler<DP::Output>, US: AsyncWrite, UL:
}
}

pub fn new_with_unit_finalization_handler<
pub fn new_using_unit_finalization_handler<
H: Hasher,
UFH: FinalizationHandler<BatchOfUnits<DP::Output, H>>,
>(
Expand Down Expand Up @@ -581,6 +581,13 @@ where
/// For a detailed description of the consensus implemented by `run_session` see
/// [docs for devs](https://cardinal-cryptography.github.io/AlephBFT/index.html)
/// or the [original paper](https://arxiv.org/abs/1908.05156).
///
/// Please note that in order to fulfill the constraint [`FinalizationHandler<BatchOfUnits<DP::Output, H>>`]
/// it is enough to provide implementation of [`FinalizationHandler<DP::Output>`]. We provide
/// implementation of [`FinalizationHandler<BatchOfUnits<DP::Output, H>>`] for anything that satisfies
/// [`FinalizationHandler<DP::Output>`]. Implementing [`FinalizationHandler<BatchOfUnits<DP::Output, H>>`]
/// directly is considered less stable since it exposes intrisics which might be subject to change.
/// Implement [`FinalizationHandler<DP::Output>`] instead, unless you absolutely know what you are doing.
pub async fn run_session<
H: Hasher,
DP: DataProvider,
Expand Down

0 comments on commit a56156c

Please sign in to comment.