Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Linter
  • Loading branch information
timorl committed Nov 10, 2022
commit 2108b2cc86d92016dcb8b45e0c18eff853b71e42
6 changes: 3 additions & 3 deletions finality-aleph/src/validator_network/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl<D: Data, A: Data + Debug, ND: Dialer<A>, NL: Listener> Service<D, A, ND, NL

// Mark a peer as legacy and return whether it is the first time we do so.
fn mark_legacy(&mut self, peer_id: &AuthorityId) -> bool {
self.manager.remove_peer(&peer_id);
self.manager.remove_peer(peer_id);
self.legacy_connected.insert(peer_id.clone())
}

Expand All @@ -201,9 +201,9 @@ impl<D: Data, A: Data + Debug, ND: Dialer<A>, NL: Listener> Service<D, A, ND, NL
fn check_for_legacy(&mut self, peer_id: &AuthorityId, connection_type: ConnectionType) -> bool {
use ConnectionType::*;
match connection_type {
LegacyIncoming => self.mark_legacy(&peer_id),
LegacyIncoming => self.mark_legacy(peer_id),
LegacyOutgoing => {
self.mark_legacy(&peer_id);
self.mark_legacy(peer_id);
false
}
// We don't unmark here, because we always return New when a connection
Expand Down