Trait sc_network_gossip::Network [−][src]
Abstraction over a network.
Required methods
fn event_stream(&self) -> Pin<Box<dyn Stream<Item = Event> + Send>>
[src]
Returns a stream of events representing what happens on the network.
fn report_peer(&self, peer_id: PeerId, reputation: ReputationChange)
[src]
Adjust the reputation of a node.
fn disconnect_peer(&self, who: PeerId)
[src]
Force-disconnect a peer.
fn write_notification(
&self,
who: PeerId,
engine_id: ConsensusEngineId,
message: Vec<u8>
)
[src]
&self,
who: PeerId,
engine_id: ConsensusEngineId,
message: Vec<u8>
)
Send a notification to a peer.
fn register_notifications_protocol(
&self,
engine_id: ConsensusEngineId,
protocol_name: Cow<'static, str>
)
[src]
&self,
engine_id: ConsensusEngineId,
protocol_name: Cow<'static, str>
)
Registers a notifications protocol.
See the documentation of [NetworkService:register_notifications_protocol
] for more information.
fn announce(&self, block: B::Hash, associated_data: Vec<u8>)
[src]
Notify everyone we’re connected to that we have the given block.
Note: this method isn’t strictly related to gossiping and should eventually be moved somewhere else.
Implementations on Foreign Types
impl<B: BlockT, H: ExHashT> Network<B> for Arc<NetworkService<B, H>>
[src]
fn event_stream(&self) -> Pin<Box<dyn Stream<Item = Event> + Send>>
[src]
fn report_peer(&self, peer_id: PeerId, reputation: ReputationChange)
[src]
fn disconnect_peer(&self, who: PeerId)
[src]
fn write_notification(
&self,
who: PeerId,
engine_id: ConsensusEngineId,
message: Vec<u8>
)
[src]
&self,
who: PeerId,
engine_id: ConsensusEngineId,
message: Vec<u8>
)
fn register_notifications_protocol(
&self,
engine_id: ConsensusEngineId,
protocol_name: Cow<'static, str>
)
[src]
&self,
engine_id: ConsensusEngineId,
protocol_name: Cow<'static, str>
)