mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 04:31:08 +00:00
Allow fallback names for protocols (#8682)
* Allow fallback names for protocols * Apply suggestions from code review Co-authored-by: Roman Proskuryakov <humbug@deeptown.org> * Fix some issues * Fix compilation after merging master Co-authored-by: Roman Proskuryakov <humbug@deeptown.org>
This commit is contained in:
@@ -136,6 +136,7 @@ impl TransactionsHandlerPrototype {
|
||||
pub fn set_config(&self) -> config::NonDefaultSetConfig {
|
||||
config::NonDefaultSetConfig {
|
||||
notifications_protocol: self.protocol_name.clone(),
|
||||
fallback_names: Vec::new(),
|
||||
max_notification_size: MAX_TRANSACTIONS_SIZE,
|
||||
set_config: config::SetConfig {
|
||||
in_peers: 0,
|
||||
@@ -318,7 +319,7 @@ 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 => {
|
||||
let _was_in = self.peers.insert(remote, Peer {
|
||||
known_transactions: LruHashSet::new(NonZeroUsize::new(MAX_KNOWN_TRANSACTIONS)
|
||||
.expect("Constant is nonzero")),
|
||||
|
||||
Reference in New Issue
Block a user