pub trait AuthorityDiscovery<Block: BlockT> {
    // Required methods
    fn authorities<'life0, 'async_trait>(
        &'life0 self,
        at: Block::Hash
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AuthorityId>, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn best_hash<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Block::Hash, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Wrapper for AuthorityDiscoveryApi. Can be be implemented by any struct without dependency on the runtime.

Required Methods§

source

fn authorities<'life0, 'async_trait>( &'life0 self, at: Block::Hash ) -> Pin<Box<dyn Future<Output = Result<Vec<AuthorityId>, ApiError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieve authority identifiers of the current and next authority set.

source

fn best_hash<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Block::Hash, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieve best block hash

Implementors§

source§

impl<Block, T> AuthorityDiscovery<Block> for Twhere T: ProvideRuntimeApi<Block> + HeaderBackend<Block> + Send + Sync, T::Api: AuthorityDiscoveryApi<Block>, Block: BlockT,