From 2274c6f624e29f0026a51d15aaae22449dc16bdf Mon Sep 17 00:00:00 2001 From: Emil Lai Date: Tue, 29 Aug 2023 13:04:38 +0200 Subject: [PATCH] Better documentation for `get_winning_bakers_epoch`. --- src/v2/mod.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/v2/mod.rs b/src/v2/mod.rs index b006fc5fd..e8bcfd6d8 100644 --- a/src/v2/mod.rs +++ b/src/v2/mod.rs @@ -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,