Improve docs for at_latest (#2035)

Tell the user that these functions operate with the last finalized block.

Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
Bastian Köcher
2025-07-04 23:06:41 +02:00
committed by GitHub
parent e892802baf
commit 05c9eafe79
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ where
self.at_or_latest(Some(block_ref.into()))
}
/// Obtain block details of the latest block hash.
/// Obtain block details of the latest finalized block.
pub fn at_latest(
&self,
) -> impl Future<Output = Result<Block<T, Client>, Error>> + Send + 'static {
+1 -1
View File
@@ -48,7 +48,7 @@ where
self.at_or_latest(Some(block_ref.into()))
}
/// Obtain events for the latest block.
/// Obtain events for the latest finalized block.
pub fn at_latest(&self) -> impl Future<Output = Result<Events<T>, Error>> + Send + 'static {
self.at_or_latest(None)
}
+1 -1
View File
@@ -40,7 +40,7 @@ where
RuntimeApi::new(self.client.clone(), block_ref.into())
}
/// Obtain a runtime API interface at the latest block hash.
/// Obtain a runtime API interface at the latest finalized block.
pub fn at_latest(
&self,
) -> impl Future<Output = Result<RuntimeApi<T, Client>, Error>> + Send + 'static {
+1 -1
View File
@@ -69,7 +69,7 @@ where
Storage::new(self.client.clone(), block_ref.into())
}
/// Obtain storage at the latest block hash.
/// Obtain storage at the latest finalized block.
pub fn at_latest(
&self,
) -> impl Future<Output = Result<Storage<T, Client>, Error>> + Send + 'static {
@@ -40,7 +40,7 @@ where
ViewFunctionsApi::new(self.client.clone(), block_ref.into())
}
/// Obtain an interface to call View Functions at the latest block hash.
/// Obtain an interface to call View Functions at the latest finalized block.
pub fn at_latest(
&self,
) -> impl Future<Output = Result<ViewFunctionsApi<T, Client>, Error>> + Send + 'static {