mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 08:15:44 +00:00
@@ -319,14 +319,16 @@ impl<B: BlockT + 'static, H: ExHashT> TransactionsHandler<B, H> {
|
|||||||
},
|
},
|
||||||
|
|
||||||
Event::NotificationStreamOpened { remote, protocol, role } if protocol == self.protocol_name => {
|
Event::NotificationStreamOpened { remote, protocol, role } if protocol == self.protocol_name => {
|
||||||
self.peers.insert(remote, Peer {
|
let _was_in = self.peers.insert(remote, Peer {
|
||||||
known_transactions: LruHashSet::new(NonZeroUsize::new(MAX_KNOWN_TRANSACTIONS)
|
known_transactions: LruHashSet::new(NonZeroUsize::new(MAX_KNOWN_TRANSACTIONS)
|
||||||
.expect("Constant is nonzero")),
|
.expect("Constant is nonzero")),
|
||||||
role,
|
role,
|
||||||
});
|
});
|
||||||
|
debug_assert!(_was_in.is_none());
|
||||||
}
|
}
|
||||||
Event::NotificationStreamClosed { remote, protocol } if protocol == self.protocol_name => {
|
Event::NotificationStreamClosed { remote, protocol } if protocol == self.protocol_name => {
|
||||||
self.peers.remove(&remote);
|
let _peer = self.peers.remove(&remote);
|
||||||
|
debug_assert!(_peer.is_some());
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::NotificationsReceived { remote, messages } => {
|
Event::NotificationsReceived { remote, messages } => {
|
||||||
|
|||||||
Reference in New Issue
Block a user