projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 2:
ef16642
)
Merge pull request #32 from ariard/prune_payment_preimages
author
Matt Corallo
<649246+TheBlueMatt@users.noreply.github.com>
Fri, 29 Jun 2018 20:43:56 +0000
(16:43 -0400)
committer
GitHub
<noreply@github.com>
Fri, 29 Jun 2018 20:43:56 +0000
(16:43 -0400)
Add pruning of preimages no longer needed + tests
src/ln/peer_handler.rs
patch
|
blob
|
history
diff --git
a/src/ln/peer_handler.rs
b/src/ln/peer_handler.rs
index aec3a32e945b3f773c0519e46aec957696d1f50c..86e2553623d2405232c97c735f548e7fb84bb04b 100644
(file)
--- a/
src/ln/peer_handler.rs
+++ b/
src/ln/peer_handler.rs
@@
-409,8
+409,10
@@
impl<Descriptor: SocketDescriptor> PeerManager<Descriptor> {
18 => {
let msg = try_potential_decodeerror!(msgs::Ping::decode(&msg_data[2..]));
- let resp = msgs::Pong { byteslen: msg.ponglen };
- encode_and_send_msg!(resp, 19);
+ if msg.ponglen < 65532 {
+ let resp = msgs::Pong { byteslen: msg.ponglen };
+ encode_and_send_msg!(resp, 19);
+ }
},
19 => {
try_potential_decodeerror!(msgs::Pong::decode(&msg_data[2..]));