Rewrap all comments to 100 line width (#9490)

* reformat everything again

* manual formatting

* last manual fix

* Fix build
This commit is contained in:
Kian Paimani
2021-08-11 16:56:55 +02:00
committed by GitHub
parent 8180c58700
commit abd08e29ce
258 changed files with 1776 additions and 1447 deletions
@@ -63,8 +63,8 @@ use wasm_timer::Instant;
/// - [`PeerState::Disabled`]: Has open TCP connection(s) unbeknownst to the peerset. No substream
/// is open.
/// - [`PeerState::Enabled`]: Has open TCP connection(s), acknowledged by the peerset.
/// - Notifications substreams are open on at least one connection, and external
/// API has been notified.
/// - Notifications substreams are open on at least one connection, and external API has been
/// notified.
/// - Notifications substreams aren't open.
/// - [`PeerState::Incoming`]: Has open TCP connection(s) and remote would like to open substreams.
/// Peerset has been asked to attribute an inbound slot.
@@ -1255,8 +1255,8 @@ impl NetworkBehaviour for Notifications {
.iter()
.any(|(_, s)| matches!(s, ConnectionState::OpenDesiredByRemote));
// If no connection is `OpenDesiredByRemote` anymore, clean up the peerset incoming
// request.
// If no connection is `OpenDesiredByRemote` anymore, clean up the peerset
// incoming request.
if no_desired_left {
// In the incoming state, we don't report "Dropped". Instead we will just
// ignore the corresponding Accept/Reject.
@@ -21,17 +21,17 @@ use asynchronous_codec::Framed;
///
/// The Substrate notifications protocol consists in the following:
///
/// - Node A opens a substream to node B and sends a message which contains some protocol-specific
/// higher-level logic. This message is prefixed with a variable-length integer message length.
/// This message can be empty, in which case `0` is sent.
/// - Node A opens a substream to node B and sends a message which contains some
/// protocol-specific higher-level logic. This message is prefixed with a variable-length
/// integer message length. This message can be empty, in which case `0` is sent.
/// - If node B accepts the substream, it sends back a message with the same properties.
/// - If instead B refuses the connection (which typically happens because no empty slot is
/// available), then it immediately closes the substream without sending back anything.
/// - Node A can then send notifications to B, prefixed with a variable-length integer indicating
/// the length of the message.
/// - Either node A or node B can signal that it doesn't want this notifications substream anymore
/// by closing its writing side. The other party should respond by also closing their own
/// writing side soon after.
/// - Node A can then send notifications to B, prefixed with a variable-length integer
/// indicating the length of the message.
/// - Either node A or node B can signal that it doesn't want this notifications substream
/// anymore by closing its writing side. The other party should respond by also closing their
/// own writing side soon after.
///
/// Notification substreams are unidirectional. If A opens a substream with B, then B is
/// encouraged but not required to open a substream to A as well.