projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
676e159
)
Don't send padding bytes for pings
author
Matt Corallo
<git@bluematt.me>
Sat, 15 Feb 2020 03:51:09 +0000
(22:51 -0500)
committer
Matt Corallo
<git@bluematt.me>
Mon, 25 May 2020 19:34:16 +0000
(15:34 -0400)
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
patch
|
blob
|
history
diff --git
a/lightning/src/ln/peer_handler.rs
b/lightning/src/ln/peer_handler.rs
index 692e6769a4bf8fe579441374aef4fecaf251dc9a..1814f0af825d77d606c1f72a805e582df9003cfb 100644
(file)
--- a/
lightning/src/ln/peer_handler.rs
+++ b/
lightning/src/ln/peer_handler.rs
@@
-1182,7
+1182,7
@@
impl<Descriptor: SocketDescriptor, CM: Deref, L: Deref> PeerManager<Descriptor,
let ping = msgs::Ping {
ponglen: 0,
- byteslen:
64
,
+ byteslen:
0
,
};
peer.pending_outbound_buffer.push_back(peer.channel_encryptor.encrypt_message(&encode_msg!(&ping)));