Trait bp_rococo::RococoFinalityApi
source · pub trait RococoFinalityApi<Block: BlockT>: Core<Block> {
// Provided methods
fn best_finalized(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Option<HeaderId<Hash, BlockNumber>>, ApiError> { ... }
fn free_headers_interval(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Option<BlockNumber>, ApiError> { ... }
fn synced_headers_grandpa_info(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Vec<StoredHeaderGrandpaInfo<Header>>, ApiError> { ... }
}
Expand description
API for querying information about the finalized chain headers.
This API is implemented by runtimes that are receiving messages from this chain, not by this chain’s runtime itself.
Provided Methods§
sourcefn best_finalized(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Option<HeaderId<Hash, BlockNumber>>, ApiError>
fn best_finalized( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<HeaderId<Hash, BlockNumber>>, ApiError>
Returns number and hash of the best finalized header known to the bridge module.
sourcefn free_headers_interval(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Option<BlockNumber>, ApiError>
fn free_headers_interval( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<BlockNumber>, ApiError>
Returns free headers interval, if it is configured in the runtime. The caller expects that if his transaction improves best known header at least by the free_headers_interval`, it will be fee-free.
See [pallet_bridge_grandpa::Config::FreeHeadersInterval
] for details.
sourcefn synced_headers_grandpa_info(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
) -> Result<Vec<StoredHeaderGrandpaInfo<Header>>, ApiError>
fn synced_headers_grandpa_info( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Vec<StoredHeaderGrandpaInfo<Header>>, ApiError>
Returns the justifications accepted in the current block.