Skip to content

Commit

Permalink
Better documentation for get_winning_bakers_epoch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Lai committed Aug 29, 2023
1 parent 14d9263 commit 2274c6f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,15 @@ impl Client {
}

/// Get the winning bakers of an historical `Epoch`.
/// The stream ends when there are no more rounds for the epoch specified.
/// This only works for epochs in at least protocol version 6.
/// Hence, when this function is invoked using [`EpochIdentifier::Block`]
/// and the [`BlockIdentifier`] is either [`BlockIdentifier::BEST`] or
/// [`BlockIdentifier::LAST_FINAL`], then [`tonic::Code::Unavailable`] is
/// returned, as these identifiers are not historical by definition.
///
/// The stream ends when there
/// are no more rounds for the epoch specified. This only works for
/// epochs in at least protocol version 6. Note that the endpoint is
/// only available on a node running at least protocol version 6.
pub async fn get_winning_bakers_epoch(
&mut self,
ei: impl Into<EpochIdentifier>,
Expand Down

0 comments on commit 2274c6f

Please sign in to comment.