mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
make NotificationStream event naming consistent (#4712)
This commit is contained in:
committed by
GitHub
parent
40e4d8fb0a
commit
21a2539a24
@@ -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,
|
||||
}));
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user