From 8d54419ddcdfc16ced2d726fd26a89bb7bc42c0f Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Fri, 24 Nov 2023 21:59:33 -0500 Subject: [PATCH] Replace TCP port specifications with UDP --- coordinator/src/p2p.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coordinator/src/p2p.rs b/coordinator/src/p2p.rs index 62e54109..80de3da5 100644 --- a/coordinator/src/p2p.rs +++ b/coordinator/src/p2p.rs @@ -279,7 +279,7 @@ impl LibP2p { .unwrap() .build(); const PORT: u16 = 30563; // 5132 ^ (('c' << 8) | 'o') - swarm.listen_on(format!("/ip4/0.0.0.0/tcp/{PORT}").parse().unwrap()).unwrap(); + swarm.listen_on(format!("/ip4/0.0.0.0/udp/{PORT}").parse().unwrap()).unwrap(); let (broadcast_send, mut broadcast_recv) = mpsc::unbounded_channel(); let (receive_send, receive_recv) = mpsc::unbounded_channel(); @@ -366,7 +366,7 @@ impl LibP2p { ))) => { for (peer, mut addr) in list { // Check the port is as expected to prevent trying to peer with Substrate nodes - if addr.pop() == Some(libp2p::multiaddr::Protocol::Tcp(PORT)) { + if addr.pop() == Some(libp2p::multiaddr::Protocol::Udp(PORT)) { log::info!("found peer via mdns"); swarm.behaviour_mut().gossipsub.add_explicit_peer(&peer); }