diff --git a/zebra-network/src/peer/client/tests/vectors.rs b/zebra-network/src/peer/client/tests/vectors.rs index 7922b7a36ad..041a80d05e6 100644 --- a/zebra-network/src/peer/client/tests/vectors.rs +++ b/zebra-network/src/peer/client/tests/vectors.rs @@ -2,13 +2,13 @@ use zebra_test::service_extensions::IsReady; -use crate::{peer::ClientTestHarness, protocol::external::types::Version, PeerError}; +use crate::{peer::ClientTestHarness, PeerError}; #[tokio::test] async fn client_service_ready_ok() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); assert!(client.is_ready().await); assert!(harness.current_error().is_none()); @@ -20,7 +20,7 @@ async fn client_service_ready_ok() { async fn client_service_ready_heartbeat_exit() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); harness.set_error(PeerError::HeartbeatTaskExited); harness.drop_heartbeat_shutdown_receiver(); @@ -34,7 +34,7 @@ async fn client_service_ready_heartbeat_exit() { async fn client_service_ready_request_drop() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); harness.set_error(PeerError::ConnectionDropped); harness.drop_outbound_client_request_receiver(); @@ -48,7 +48,7 @@ async fn client_service_ready_request_drop() { async fn client_service_ready_request_close() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); harness.set_error(PeerError::ConnectionClosed); harness.close_outbound_client_request_receiver(); @@ -63,7 +63,7 @@ async fn client_service_ready_request_close() { async fn client_service_ready_error_in_slot() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); harness.set_error(PeerError::Overloaded); @@ -77,7 +77,7 @@ async fn client_service_ready_error_in_slot() { async fn client_service_ready_multiple_errors() { zebra_test::init(); - let (mut client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (mut client, mut harness) = ClientTestHarness::build().finish(); harness.set_error(PeerError::DuplicateHandshake); harness.drop_heartbeat_shutdown_receiver(); @@ -92,7 +92,7 @@ async fn client_service_ready_multiple_errors() { async fn client_service_drop_cleanup() { zebra_test::init(); - let (client, mut harness) = ClientTestHarness::build(Version(0)).finish(); + let (client, mut harness) = ClientTestHarness::build().finish(); std::mem::drop(client); diff --git a/zebra-network/src/peer_set/initialize/tests/vectors.rs b/zebra-network/src/peer_set/initialize/tests/vectors.rs index d46fb2eeb34..e077bd5cf36 100644 --- a/zebra-network/src/peer_set/initialize/tests/vectors.rs +++ b/zebra-network/src/peer_set/initialize/tests/vectors.rs @@ -42,7 +42,7 @@ use crate::{ set::MorePeers, ActiveConnectionCounter, CandidateSet, }, - protocol::{external::types::Version, types::PeerServices}, + protocol::types::PeerServices, AddressBook, BoxError, Config, Request, Response, }; @@ -348,7 +348,7 @@ async fn crawler_peer_limit_one_connect_ok_then_drop() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Fake the connection closing. std::mem::drop(connection_tracker); @@ -412,7 +412,7 @@ async fn crawler_peer_limit_one_connect_ok_stay_open() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Make the connection staying open. peer_tracker_tx @@ -523,7 +523,7 @@ async fn crawler_peer_limit_default_connect_ok_then_drop() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Fake the connection closing. std::mem::drop(connection_tracker); @@ -589,7 +589,7 @@ async fn crawler_peer_limit_default_connect_ok_stay_open() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Make the connection staying open. peer_tracker_tx @@ -732,7 +732,7 @@ async fn listener_peer_limit_one_handshake_ok_then_drop() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Actually close the connection. std::mem::drop(connection_tracker); @@ -800,7 +800,7 @@ async fn listener_peer_limit_one_handshake_ok_stay_open() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Make the connection staying open. peer_tracker_tx @@ -920,7 +920,7 @@ async fn listener_peer_limit_default_handshake_ok_then_drop() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Actually close the connection. std::mem::drop(connection_tracker); @@ -988,7 +988,7 @@ async fn listener_peer_limit_default_handshake_ok_stay_open() { connection_tracker, } = req; - let (fake_client, _harness) = ClientTestHarness::build(Version(1)).finish(); + let (fake_client, _harness) = ClientTestHarness::build().finish(); // Make the connection staying open. peer_tracker_tx