mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Change Runtime APIs best_finalized() signature
Change Runtime APIs best_finalized() signature to return Option<HeaderId> Signed-off-by: Serban Iorga <serban@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
f13211344b
commit
7969459d07
@@ -562,17 +562,13 @@ where
|
||||
Some(at_self_hash),
|
||||
)
|
||||
.await?;
|
||||
let decoded_best_finalized_peer_on_self =
|
||||
Option::<(BlockNumberOf<PeerChain>, HashOf<PeerChain>)>::decode(
|
||||
&mut &encoded_best_finalized_peer_on_self.0[..],
|
||||
)
|
||||
.map_err(SubstrateError::ResponseParseFailed)?
|
||||
.map(Ok)
|
||||
.unwrap_or(Err(SubstrateError::BridgePalletIsNotInitialized))?;
|
||||
let peer_on_self_best_finalized_id =
|
||||
HeaderId(decoded_best_finalized_peer_on_self.0, decoded_best_finalized_peer_on_self.1);
|
||||
|
||||
Ok(peer_on_self_best_finalized_id)
|
||||
Option::<HeaderId<HashOf<PeerChain>, BlockNumberOf<PeerChain>>>::decode(
|
||||
&mut &encoded_best_finalized_peer_on_self.0[..],
|
||||
)
|
||||
.map_err(SubstrateError::ResponseParseFailed)?
|
||||
.map(Ok)
|
||||
.unwrap_or(Err(SubstrateError::BridgePalletIsNotInitialized))
|
||||
}
|
||||
|
||||
fn make_message_details_map<C: Chain>(
|
||||
|
||||
@@ -107,14 +107,13 @@ where
|
||||
Some(at_block.1),
|
||||
)
|
||||
.await?;
|
||||
let decoded_best_finalized_source_block =
|
||||
Option::<(BlockNumberOf<P::SourceRelayChain>, HashOf<P::SourceRelayChain>)>::decode(
|
||||
&mut &encoded_best_finalized_source_block.0[..],
|
||||
)
|
||||
.map_err(SubstrateError::ResponseParseFailed)?
|
||||
.map(Ok)
|
||||
.unwrap_or(Err(SubstrateError::BridgePalletIsNotInitialized))?;
|
||||
Ok(HeaderId(decoded_best_finalized_source_block.0, decoded_best_finalized_source_block.1))
|
||||
|
||||
Option::<HeaderId<HashOf<P::SourceRelayChain>, BlockNumberOf<P::SourceRelayChain>>>::decode(
|
||||
&mut &encoded_best_finalized_source_block.0[..],
|
||||
)
|
||||
.map_err(SubstrateError::ResponseParseFailed)?
|
||||
.map(Ok)
|
||||
.unwrap_or(Err(SubstrateError::BridgePalletIsNotInitialized))
|
||||
}
|
||||
|
||||
async fn parachain_head(
|
||||
|
||||
Reference in New Issue
Block a user