From 06a6cd29b0d2af1aafecd47abe51dacb504011e5 Mon Sep 17 00:00:00 2001
From: Luke Parker <lukeparker5132@gmail.com>
Date: Wed, 6 Sep 2023 22:57:33 -0400
Subject: [PATCH] Set nodelay on coordinator's P2P sockets

---
 coordinator/src/p2p.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coordinator/src/p2p.rs b/coordinator/src/p2p.rs
index 81c20cd9..8d8cf68d 100644
--- a/coordinator/src/p2p.rs
+++ b/coordinator/src/p2p.rs
@@ -176,7 +176,7 @@ impl LibP2p {
     // Uses noise for authentication, yamux for multiplexing
     // TODO: Do we want to add a custom authentication protocol to only accept connections from
     // fellow validators? Doing so would reduce the potential for spam
-    let transport = libp2p_tokio::Transport::new(Config::default())
+    let transport = libp2p_tokio::Transport::new(Config::default().nodelay(true))
       .upgrade(upgrade::Version::V1)
       .authenticate(noise::Config::new(&throwaway_key_pair).unwrap())
       .multiplex(yamux::Config::default())