mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-25 20:09:55 +00:00
Clean up sc-network (#9761)
* Clean up sc-network - Avoid using clone() for the Copy type `PeerId`. - Use `find_map` for `filter_map` and `next`. - Use `Self`. * More on Copy types * Cargo +nightly fmt --all * More .. * fmt * Revert vec![default_notif_handshake_message]
This commit is contained in:
1 parent
0472a43855
commit
2562f8c65e
37 files changed
+475
-526
No files matched your search
@@ -696,10 +696,10 @@ mod tests {
|
||||
let mut network = NoOpNetwork::default();
|
||||
|
||||
let peer_id = PeerId::random();
|
||||
consensus.new_peer(&mut network, peer_id.clone(), ObservedRole::Full);
|
||||
consensus.new_peer(&mut network, peer_id, ObservedRole::Full);
|
||||
assert!(consensus.peers.contains_key(&peer_id));
|
||||
|
||||
consensus.peer_disconnected(&mut network, peer_id.clone());
|
||||
consensus.peer_disconnected(&mut network, peer_id);
|
||||
assert!(!consensus.peers.contains_key(&peer_id));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user