Trait tributary_chain::P2p
source · pub trait P2p: '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 Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
sourcefn broadcast<'life0, 'async_trait>(
&'life0 self,
genesis: [u8; 32],
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast<'life0, 'async_trait>(
&'life0 self,
genesis: [u8; 32],
msg: Vec<u8>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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.