From: Matt Corallo Date: Sat, 15 Feb 2020 03:51:09 +0000 (-0500) Subject: Don't send padding bytes for pings X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ea7222f098d2699900b3e5db271bbb887c1f7a05;p=rust-lightning 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. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index aa6954407..b4e3e533e 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -1181,7 +1181,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)));