mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 13:11:10 +00:00
Add a method to fetch current finalized head hash (#57)
* chore: Update to latest substrate master renames * feat: Introduce Client::finalized_head
This commit is contained in:
committed by
Andrew Jones
parent
a9df35c570
commit
923013628b
@@ -207,6 +207,12 @@ impl<T: System + Balances + 'static, S: 'static> Client<T, S> {
|
||||
.and_then(|rpc| rpc.block_hash(hash.map(|h| h)))
|
||||
}
|
||||
|
||||
/// Get a block hash of the latest finalized block
|
||||
pub fn finalized_head(&self) -> impl Future<Item = T::Hash, Error = Error> {
|
||||
self.connect()
|
||||
.and_then(|rpc| rpc.finalized_head())
|
||||
}
|
||||
|
||||
/// Get a block
|
||||
pub fn block<H>(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user