mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Remove deprecated Runtime Header APIs (#932)
This commit is contained in:
committed by
Bastian Köcher
parent
8028fe1632
commit
4916ec3432
@@ -308,7 +308,6 @@ parameter_types! {
|
|||||||
// Note that once this is hit the pallet will essentially throttle incoming requests down to one
|
// Note that once this is hit the pallet will essentially throttle incoming requests down to one
|
||||||
// call per block.
|
// call per block.
|
||||||
pub const MaxRequests: u32 = 50;
|
pub const MaxRequests: u32 = 50;
|
||||||
pub const WestendValidatorCount: u32 = 255;
|
|
||||||
|
|
||||||
// Number of headers to keep.
|
// Number of headers to keep.
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -259,31 +259,6 @@ pub const FROM_MILLAU_LATEST_CONFIRMED_NONCE_METHOD: &str = "FromMillauInboundLa
|
|||||||
pub const FROM_MILLAU_UNREWARDED_RELAYERS_STATE: &str = "FromMillauInboundLaneApi_unrewarded_relayers_state";
|
pub const FROM_MILLAU_UNREWARDED_RELAYERS_STATE: &str = "FromMillauInboundLaneApi_unrewarded_relayers_state";
|
||||||
|
|
||||||
sp_api::decl_runtime_apis! {
|
sp_api::decl_runtime_apis! {
|
||||||
/// API for querying information about Millau headers from the Bridge Pallet instance.
|
|
||||||
///
|
|
||||||
/// This API is implemented by runtimes that are bridging with the Millau chain, not the
|
|
||||||
/// Millau runtime itself.
|
|
||||||
pub trait MillauHeaderApi {
|
|
||||||
/// Returns number and hash of the best blocks known to the bridge module.
|
|
||||||
///
|
|
||||||
/// Will return multiple headers if there are many headers at the same "best" height.
|
|
||||||
///
|
|
||||||
/// The caller should only submit an `import_header` transaction that makes
|
|
||||||
/// (or leads to making) other header the best one.
|
|
||||||
fn best_blocks() -> Vec<(BlockNumber, Hash)>;
|
|
||||||
/// Returns number and hash of the best finalized block known to the bridge module.
|
|
||||||
fn finalized_block() -> (BlockNumber, Hash);
|
|
||||||
/// Returns numbers and hashes of headers that require finality proofs.
|
|
||||||
///
|
|
||||||
/// An empty response means that there are no headers which currently require a
|
|
||||||
/// finality proof.
|
|
||||||
fn incomplete_headers() -> Vec<(BlockNumber, Hash)>;
|
|
||||||
/// Returns true if the header is known to the runtime.
|
|
||||||
fn is_known_block(hash: Hash) -> bool;
|
|
||||||
/// Returns true if the header is considered finalized by the runtime.
|
|
||||||
fn is_finalized_block(hash: Hash) -> bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// API for querying information about the finalized Millau headers.
|
/// API for querying information about the finalized Millau headers.
|
||||||
///
|
///
|
||||||
/// This API is implemented by runtimes that are bridging with the Millau chain, not the
|
/// This API is implemented by runtimes that are bridging with the Millau chain, not the
|
||||||
|
|||||||
@@ -220,31 +220,6 @@ pub const FROM_RIALTO_LATEST_CONFIRMED_NONCE_METHOD: &str = "FromRialtoInboundLa
|
|||||||
pub const FROM_RIALTO_UNREWARDED_RELAYERS_STATE: &str = "FromRialtoInboundLaneApi_unrewarded_relayers_state";
|
pub const FROM_RIALTO_UNREWARDED_RELAYERS_STATE: &str = "FromRialtoInboundLaneApi_unrewarded_relayers_state";
|
||||||
|
|
||||||
sp_api::decl_runtime_apis! {
|
sp_api::decl_runtime_apis! {
|
||||||
/// API for querying information about Rialto headers from the Bridge Pallet instance.
|
|
||||||
///
|
|
||||||
/// This API is implemented by runtimes that are bridging with the Rialto chain, not the
|
|
||||||
/// Rialto runtime itself.
|
|
||||||
pub trait RialtoHeaderApi {
|
|
||||||
/// Returns number and hash of the best blocks known to the bridge module.
|
|
||||||
///
|
|
||||||
/// Will return multiple headers if there are many headers at the same "best" height.
|
|
||||||
///
|
|
||||||
/// The caller should only submit an `import_header` transaction that makes
|
|
||||||
/// (or leads to making) other header the best one.
|
|
||||||
fn best_blocks() -> Vec<(BlockNumber, Hash)>;
|
|
||||||
/// Returns number and hash of the best finalized block known to the bridge module.
|
|
||||||
fn finalized_block() -> (BlockNumber, Hash);
|
|
||||||
/// Returns numbers and hashes of headers that require finality proofs.
|
|
||||||
///
|
|
||||||
/// An empty response means that there are no headers which currently require a
|
|
||||||
/// finality proof.
|
|
||||||
fn incomplete_headers() -> Vec<(BlockNumber, Hash)>;
|
|
||||||
/// Returns true if the header is known to the runtime.
|
|
||||||
fn is_known_block(hash: Hash) -> bool;
|
|
||||||
/// Returns true if the header is considered finalized by the runtime.
|
|
||||||
fn is_finalized_block(hash: Hash) -> bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// API for querying information about the finalized Rialto headers.
|
/// API for querying information about the finalized Rialto headers.
|
||||||
///
|
///
|
||||||
/// This API is implemented by runtimes that are bridging with the Rialto chain, not the
|
/// This API is implemented by runtimes that are bridging with the Rialto chain, not the
|
||||||
|
|||||||
Reference in New Issue
Block a user