From 3569405daca0eb707e4ca281f602c988339d665c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 14 Feb 2020 22:51:09 -0500 Subject: [PATCH] Don't send padding bytes for pings We (somewhat needlessly) send an extra 64 bytes with every ping. While this isn't exactly a big deal, I saw it and figured we shouldn't waste bytes on the wire given some of the constraints of potential users. --- lightning/src/ln/peer_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index f5eda9e66..9e53cb135 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -1180,7 +1180,7 @@ impl PeerManager where let ping = msgs::Ping { ponglen: 0, - byteslen: 64, + byteslen: 0, }; peer.pending_outbound_buffer.push_back(peer.channel_encryptor.encrypt_message(&encode_msg!(&ping))); -- 2.39.5