Skip to content

Commit

Permalink
[mempool] Ensure old tests only use DirectSend
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario authored and bors-libra committed Nov 13, 2021
1 parent 4ec6e12 commit a720f2e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mempool/src/tests/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ use network::{
conn_notifs_channel, ConnectionNotification, ConnectionRequestSender,
PeerManagerNotification, PeerManagerRequest, PeerManagerRequestSender,
},
protocols::{
network::{NetworkEvents, NewNetworkEvents, NewNetworkSender},
wire::handshake::v1::ProtocolIdSet,
},
protocols::network::{NetworkEvents, NewNetworkEvents, NewNetworkSender},
transport::ConnectionMetadata,
DisconnectReason, ProtocolId,
};
Expand Down Expand Up @@ -412,7 +409,9 @@ impl Node {
) {
let mut metadata =
ConnectionMetadata::mock_with_role_and_origin(new_peer.peer_id(), peer_role, origin);
metadata.application_protocols = ProtocolIdSet::all_known();
metadata
.application_protocols
.insert(ProtocolId::MempoolDirectSend);
let notif = ConnectionNotification::NewPeer(metadata.clone(), NetworkContext::mock());
self.peer_metadata_storage
.insert_connection(new_peer.network_id(), metadata);
Expand Down

0 comments on commit a720f2e

Please sign in to comment.