mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 20:25:40 +00:00
Fix on-different-forks metrics during initialization (#1468)
* fix on-different-forks metrics during initialization * "initialize" parachain finality pallet in on-demand parachains relay * decrease converstion rate requests count * more error logging * fix compilation * clippy
This commit is contained in:
committed by
Bastian Köcher
parent
418942826d
commit
31a2be845c
@@ -117,7 +117,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Kusama runtime itself.
|
||||
pub trait KusamaFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Kusama chain.
|
||||
|
||||
@@ -314,7 +314,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Millau runtime itself.
|
||||
pub trait MillauFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Millau chain.
|
||||
|
||||
@@ -118,7 +118,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Polkadot runtime itself.
|
||||
pub trait PolkadotFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Polkadot chain.
|
||||
|
||||
@@ -241,7 +241,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// RialtoParachain runtime itself.
|
||||
pub trait RialtoParachainFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to RialtoParachain chain.
|
||||
|
||||
@@ -262,7 +262,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Rialto runtime itself.
|
||||
pub trait RialtoFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Rialto chain.
|
||||
|
||||
@@ -113,7 +113,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Rococo runtime itself.
|
||||
pub trait RococoFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Rococo chain.
|
||||
|
||||
@@ -106,6 +106,6 @@ sp_api::decl_runtime_apis! {
|
||||
/// Westend runtime itself.
|
||||
pub trait WestendFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ sp_api::decl_runtime_apis! {
|
||||
/// Wococo runtime itself.
|
||||
pub trait WococoFinalityApi {
|
||||
/// Returns number and hash of the best finalized header known to the bridge module.
|
||||
fn best_finalized() -> (BlockNumber, Hash);
|
||||
fn best_finalized() -> Option<(BlockNumber, Hash)>;
|
||||
}
|
||||
|
||||
/// Outbound message lane API for messages that are sent to Wococo chain.
|
||||
|
||||
@@ -88,7 +88,7 @@ pub trait InclusionProofVerifier {
|
||||
/// A trait for pallets which want to keep track of finalized headers from a bridged chain.
|
||||
pub trait HeaderChain<H, E> {
|
||||
/// Get the best finalized header known to the header chain.
|
||||
fn best_finalized() -> H;
|
||||
fn best_finalized() -> Option<H>;
|
||||
|
||||
/// Get the best authority set known to the header chain.
|
||||
fn authority_set() -> AuthoritySet;
|
||||
@@ -98,8 +98,8 @@ pub trait HeaderChain<H, E> {
|
||||
}
|
||||
|
||||
impl<H: Default, E> HeaderChain<H, E> for () {
|
||||
fn best_finalized() -> H {
|
||||
H::default()
|
||||
fn best_finalized() -> Option<H> {
|
||||
None
|
||||
}
|
||||
|
||||
fn authority_set() -> AuthoritySet {
|
||||
|
||||
Reference in New Issue
Block a user