pub enum NetCommand {
Broadcast(Vec<u8>),
SendTo(ValidatorId, Vec<u8>),
AddPeer(ValidatorId, PeerId, Vec<Multiaddr>),
RemovePeer(ValidatorId),
SyncRequest(PeerId, Vec<u8>),
SyncRespond(RequestId, Vec<u8>),
EpochChange(Vec<(ValidatorId, PublicKey)>),
BroadcastTx(Vec<u8>),
}Expand description
Commands sent from the NetworkSink to the NetworkService
Variants§
Broadcast(Vec<u8>)
SendTo(ValidatorId, Vec<u8>)
AddPeer(ValidatorId, PeerId, Vec<Multiaddr>)
RemovePeer(ValidatorId)
SyncRequest(PeerId, Vec<u8>)
Send a sync request to a specific peer
SyncRespond(RequestId, Vec<u8>)
Respond to a sync request
EpochChange(Vec<(ValidatorId, PublicKey)>)
Update peer_map from new validator set (epoch transition)
BroadcastTx(Vec<u8>)
Broadcast a raw transaction to all connected peers via mempool gossip.
Auto Trait Implementations§
impl Freeze for NetCommand
impl RefUnwindSafe for NetCommand
impl Send for NetCommand
impl Sync for NetCommand
impl Unpin for NetCommand
impl UnsafeUnpin for NetCommand
impl UnwindSafe for NetCommand
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