diff --git a/substrate/client/network-gossip/src/bridge.rs b/substrate/client/network-gossip/src/bridge.rs index 2b0b19b8761660dec26ac3cff408712e9b4069d2..d6d6805b3e56cc750a97e9c01eaa25767419fc9d 100644 --- a/substrate/client/network-gossip/src/bridge.rs +++ b/substrate/client/network-gossip/src/bridge.rs @@ -100,7 +100,7 @@ impl<B: BlockT> GossipEngine<B> { let inner = &mut *inner; inner.state_machine.new_peer(&mut *inner.network, remote, roles); } - Event::NotificationsStreamClosed { remote, engine_id: msg_engine_id } => { + Event::NotificationStreamClosed { remote, engine_id: msg_engine_id } => { if msg_engine_id != engine_id { continue; } diff --git a/substrate/client/network/src/behaviour.rs b/substrate/client/network/src/behaviour.rs index 7cc9eee74d6d5906b2ec978ec8152f93a6594dca..faaa25c660e4fac2ba481655a075f7494144fdea 100644 --- a/substrate/client/network/src/behaviour.rs +++ b/substrate/client/network/src/behaviour.rs @@ -144,9 +144,9 @@ Behaviour<B, S, H> { roles, })); }, - CustomMessageOutcome::NotificationsStreamClosed { remote, protocols } => + CustomMessageOutcome::NotificationStreamClosed { remote, protocols } => for engine_id in protocols { - self.events.push(BehaviourOut::Event(Event::NotificationsStreamClosed { + self.events.push(BehaviourOut::Event(Event::NotificationStreamClosed { remote: remote.clone(), engine_id, })); diff --git a/substrate/client/network/src/protocol.rs b/substrate/client/network/src/protocol.rs index 6914ea9efe138427b437574aff1a050c4eb59916..7a9fc7ecfbb2471caf415ab73cf5ffab13a056c7 100644 --- a/substrate/client/network/src/protocol.rs +++ b/substrate/client/network/src/protocol.rs @@ -1792,7 +1792,7 @@ pub enum CustomMessageOutcome<B: BlockT> { /// Notification protocols have been opened with a remote. NotificationStreamOpened { remote: PeerId, protocols: Vec<ConsensusEngineId>, roles: Roles }, /// Notification protocols have been closed with a remote. - NotificationsStreamClosed { remote: PeerId, protocols: Vec<ConsensusEngineId> }, + NotificationStreamClosed { remote: PeerId, protocols: Vec<ConsensusEngineId> }, /// Messages have been received on one or more notifications protocols. NotificationsReceived { remote: PeerId, messages: Vec<(ConsensusEngineId, Bytes)> }, None, @@ -1931,7 +1931,7 @@ Protocol<B, S, H> { LegacyProtoOut::CustomProtocolClosed { peer_id, .. } => { self.on_peer_disconnected(peer_id.clone()); // Notify all the notification protocols as closed. - CustomMessageOutcome::NotificationsStreamClosed { + CustomMessageOutcome::NotificationStreamClosed { remote: peer_id, protocols: self.registered_notif_protocols.iter().cloned().collect(), } diff --git a/substrate/client/network/src/protocol/event.rs b/substrate/client/network/src/protocol/event.rs index 47bf057505db7c5a77e716ca2c1c8c372493ef60..e239e9d9831821d524434d311a26ed47d02d0d4d 100644 --- a/substrate/client/network/src/protocol/event.rs +++ b/substrate/client/network/src/protocol/event.rs @@ -61,7 +61,7 @@ pub enum Event { /// Closed a substream with the given node. Always matches a corresponding previous /// `NotificationStreamOpened` message. - NotificationsStreamClosed { + NotificationStreamClosed { /// Node we closed the substream with. remote: PeerId, /// The concerned protocol. Each protocol uses a different substream.