Set nodelay on coordinator's P2P sockets

This commit is contained in:
Luke Parker 2023-09-06 22:57:33 -04:00
parent 2472ec7ba8
commit 06a6cd29b0
No known key found for this signature in database

View file

@ -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())