Skip to content

Commit 0cae791

Browse files
apollo_network: using quic
1 parent f9fdf44 commit 0cae791

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

crates/apollo_network/src/bin/broadcast_network_stress_test_node/run/args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def add_shared_args_to_parser(parser: argparse.ArgumentParser):
5454
"--tcp",
5555
help="Sets the multi-addresses to use TCP instead of UDP/QUIC",
5656
action="store_true",
57-
default=True,
57+
default=False,
5858
)
5959
parser.add_argument(
6060
"--explore-cool-down-duration-seconds",

crates/apollo_network/src/network_manager/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,9 @@ impl NetworkManager {
838838
let mut swarm = SwarmBuilder::with_existing_identity(key_pair)
839839
.with_tokio()
840840
// TODO(AndrewL): .with_quic()
841-
.with_tcp(Default::default(), noise::Config::new, yamux::Config::default)
842-
.expect("Error building TCP transport")
841+
.with_quic()
842+
// .with_tcp(Default::default(), noise::Config::new, yamux::Config::default)
843+
// .expect("Error building TCP transport")
843844
.with_dns()
844845
.expect("Error building DNS transport")
845846
.with_behaviour(|key| {

crates/apollo_network/src/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ pub fn is_localhost(address: &Multiaddr) -> bool {
109109
pub fn make_multiaddr(ip: Ipv4Addr, port: u16, peer_id: Option<PeerId>) -> Multiaddr {
110110
let mut address = Multiaddr::empty().with(Protocol::Ip4(ip));
111111
// TODO(AndrewL): address = address.with(Protocol::Udp(port)).with(Protocol::QuicV1);
112-
address = address.with(Protocol::Tcp(port));
112+
address = address.with(Protocol::Udp(port)).with(Protocol::QuicV1);
113+
// address = address.with(Protocol::Tcp(port));
113114
if let Some(peer_id) = peer_id {
114115
address = address.with(Protocol::P2p(peer_id))
115116
}

0 commit comments

Comments
 (0)