pub struct Litep2pNetworkSink { /* private fields */ }Expand description
NetworkSink backed by litep2p, for use by the consensus engine. Also provides methods for peer management and sync.
Implementations§
Source§impl Litep2pNetworkSink
impl Litep2pNetworkSink
pub fn add_peer(&self, vid: ValidatorId, pid: PeerId, addrs: Vec<Multiaddr>)
pub fn remove_peer(&self, vid: ValidatorId)
pub fn send_sync_request(&self, peer_id: PeerId, request: &SyncRequest)
pub fn send_sync_response(&self, request_id: RequestId, response: &SyncResponse)
Trait Implementations§
Source§impl NetworkSink for Litep2pNetworkSink
impl NetworkSink for Litep2pNetworkSink
fn broadcast(&self, msg: ConsensusMessage)
fn send_to(&self, target: ValidatorId, msg: ConsensusMessage)
Auto Trait Implementations§
impl Freeze for Litep2pNetworkSink
impl RefUnwindSafe for Litep2pNetworkSink
impl Send for Litep2pNetworkSink
impl Sync for Litep2pNetworkSink
impl Unpin for Litep2pNetworkSink
impl UnsafeUnpin for Litep2pNetworkSink
impl UnwindSafe for Litep2pNetworkSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more