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=refs%2Fheads%2F2020-02-bitcoinrpc-dep-head-test;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 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)));