pub trait HasLatestHeader<B: Block>: Send + Sync + 'static {
    // Required method
    fn get_latest_header(&self) -> &Arc<RwLock<Option<B::Header>>>;

    // Provided method
    fn get_latest_block_number(&self) -> NumberFor<B> { ... }
}

Required Methods§

source

fn get_latest_header(&self) -> &Arc<RwLock<Option<B::Header>>>

Provided Methods§

source

fn get_latest_block_number(&self) -> NumberFor<B>

Gets latest block number from latest block header

Implementations on Foreign Types§

source§

impl<'a, B: Block, T: 'a + HasLatestHeader<B> + ?Sized> HasLatestHeader<B> for &'a mut Twhere &'a mut T: Send + Sync + 'static,

source§

fn get_latest_header(&self) -> &Arc<RwLock<Option<B::Header>>>

source§

fn get_latest_block_number(&self) -> NumberFor<B>

source§

impl<'a, B: Block, T: 'a + HasLatestHeader<B> + ?Sized> HasLatestHeader<B> for &'a Twhere &'a T: Send + Sync + 'static,

source§

fn get_latest_header(&self) -> &Arc<RwLock<Option<B::Header>>>

source§

fn get_latest_block_number(&self) -> NumberFor<B>

source§

impl<B: Block, T: HasLatestHeader<B> + ?Sized> HasLatestHeader<B> for Arc<T>where Arc<T>: Send + Sync + 'static,

source§

fn get_latest_header(&self) -> &Arc<RwLock<Option<B::Header>>>

source§

fn get_latest_block_number(&self) -> NumberFor<B>

Implementors§

source§

impl<B> HasLatestHeader<B> for GossipHandler<B>where B: Block,

source§

impl<B, BE, C, GE> HasLatestHeader<B> for DKGWorker<B, BE, C, GE>where B: Block, BE: Backend<B> + 'static, GE: GossipEngineIface, C: Client<B, BE> + 'static, MaxProposalLength: Get<u32>, MaxAuthorities: Get<u32>,

source§

impl<B, BE, C, GE, MaxProposalLength: Get<u32> + Clone + Send + Sync + Debug + 'static, BatchId: Clone + Send + Sync + Debug + 'static + Unpin, MaxProposalsInBatch: Get<u32> + Clone + Send + Sync + Debug + 'static + Unpin, MaxSignatureLength: Get<u32> + Clone + Send + Sync + Debug + 'static + Unpin> HasLatestHeader<B> for DKGProtocolEngine<B, BE, C, GE, MaxProposalLength, MaxAuthorities, BatchId, MaxProposalsInBatch, MaxSignatureLength>where B: Block, BE: Backend<B> + 'static, GE: GossipEngineIface, C: Client<B, BE> + 'static,

source§

impl<B: Block> HasLatestHeader<B> for Clock<B>