Skip to content

Commit 1de698f

Browse files
PeerMan: fix bug in drop_gossip util
Fixes a flipped bool that was introduced in 4a1ee5f
1 parent 414d8e1 commit 1de698f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,8 @@ impl Peer {
399399

400400
/// Returns whether this peer's buffer is full and we should drop gossip messages.
401401
fn buffer_full_drop_gossip(&self) -> bool {
402-
if self.pending_outbound_buffer.len() > OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP
403-
|| self.msgs_sent_since_pong > BUFFER_DRAIN_MSGS_PER_TICK * FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO {
404-
return false
405-
}
406-
true
402+
self.pending_outbound_buffer.len() > OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP ||
403+
self.msgs_sent_since_pong > BUFFER_DRAIN_MSGS_PER_TICK * FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO
407404
}
408405
}
409406

0 commit comments

Comments
 (0)