mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-05 18:31:07 +00:00
added at_latest (#900)
* added at_latest * change some documentation * remove inline
This commit is contained in:
1 parent
a69b3e45e7
commit
3b9fd72b26
18 files changed
+83
-55
No files matched your search
@@ -37,6 +37,19 @@ where
|
||||
/// runtime upgrade. You can attempt to retrieve events from older blocks,
|
||||
/// but may run into errors attempting to work with them.
|
||||
pub fn at(
|
||||
&self,
|
||||
block_hash: T::Hash,
|
||||
) -> impl Future<Output = Result<Events<T>, Error>> + Send + 'static {
|
||||
self.at_or_latest(Some(block_hash))
|
||||
}
|
||||
|
||||
/// Obtain events at the latest block hash.
|
||||
pub fn at_latest(&self) -> impl Future<Output = Result<Events<T>, Error>> + Send + 'static {
|
||||
self.at_or_latest(None)
|
||||
}
|
||||
|
||||
/// Obtain events at some block hash.
|
||||
fn at_or_latest(
|
||||
&self,
|
||||
block_hash: Option<T::Hash>,
|
||||
) -> impl Future<Output = Result<Events<T>, Error>> + Send + 'static {
|
||||
|
||||
Reference in new issue
Block a user