BlockProducer

Trait BlockProducer 

Source
pub trait BlockProducer: Send {
    // Required method
    fn produce_block<SealBlock>(
        &mut self,
        claimed_slot: ClaimedSlot,
        best_beacon_chain_header: &BeaconChainHeader<'_>,
        seal_block: SealBlock,
    ) -> impl Future<Output = ()> + Send
       where SealBlock: AsyncFnOnce<(Blake3Hash,), Output = Option<OwnedBlockHeaderSeal>, CallOnceFuture: Send> + Send;
}
Expand description

Block builder interface

Required Methods§

Source

fn produce_block<SealBlock>( &mut self, claimed_slot: ClaimedSlot, best_beacon_chain_header: &BeaconChainHeader<'_>, seal_block: SealBlock, ) -> impl Future<Output = ()> + Send
where SealBlock: AsyncFnOnce<(Blake3Hash,), Output = Option<OwnedBlockHeaderSeal>, CallOnceFuture: Send> + Send,

Produce (build and import) a new block for the claimed slot

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<BB, BI, CI> BlockProducer for BeaconChainBlockProducer<BB, BI, CI>
where BB: BlockBuilder<OwnedBeaconChainBlock>, BI: BlockImport<OwnedBeaconChainBlock>, CI: ChainInfo<OwnedBeaconChainBlock>,