Trait serai_coordinator::p2p::TributaryP2p

source ·
pub(crate) trait TributaryP2p: 'static + Send + Sync + Clone + Debug {
    // Required method
    fn broadcast<'life0, 'async_trait>(
        &'life0 self,
        genesis: [u8; 32],
        msg: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

source

fn broadcast<'life0, 'async_trait>( &'life0 self, genesis: [u8; 32], msg: Vec<u8>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Broadcast a message to all other members of the Tributary with the specified genesis.

The Tributary will re-broadcast consensus messages on a fixed interval to ensure they aren’t prematurely dropped from the P2P layer. THe P2P layer SHOULD perform content-based deduplication to ensure a sane amount of load.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<P> P2p for Arc<P>
where P: P2p,

source§

fn broadcast<'life0, 'async_trait>( &'life0 self, genesis: [u8; 32], msg: Vec<u8>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Arc<P>: 'async_trait,

Implementors§