From: Valentine Wallace Date: Thu, 25 Aug 2022 17:58:49 +0000 (-0400) Subject: PeerMan: rename drop_gossip util to be more accurate X-Git-Tag: v0.0.111~24^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ab149dc9d51b4d560b7ef7d86c9718044b998264;p=rust-lightning PeerMan: rename drop_gossip util to be more accurate It's more accurate to name it as dropping gossip broadcasts, as it won't drop all gossip. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 925d7e594..08efffe96 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -398,7 +398,7 @@ impl Peer { } /// Returns whether this peer's buffer is full and we should drop gossip messages. - fn buffer_full_drop_gossip(&self) -> bool { + fn buffer_full_drop_gossip_broadcast(&self) -> bool { self.pending_outbound_buffer.len() > OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP || self.msgs_sent_since_pong > BUFFER_DRAIN_MSGS_PER_TICK * FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO } @@ -1322,7 +1322,7 @@ impl P !peer.should_forward_channel_announcement(msg.contents.short_channel_id) { continue } - if peer.buffer_full_drop_gossip() { + if peer.buffer_full_drop_gossip_broadcast() { log_gossip!(self.logger, "Skipping broadcast message to {:?} as its outbound buffer is full", peer.their_node_id); continue; } @@ -1346,7 +1346,7 @@ impl P !peer.should_forward_node_announcement(msg.contents.node_id) { continue } - if peer.buffer_full_drop_gossip() { + if peer.buffer_full_drop_gossip_broadcast() { log_gossip!(self.logger, "Skipping broadcast message to {:?} as its outbound buffer is full", peer.their_node_id); continue; } @@ -1369,7 +1369,7 @@ impl P !peer.should_forward_channel_announcement(msg.contents.short_channel_id) { continue } - if peer.buffer_full_drop_gossip() { + if peer.buffer_full_drop_gossip_broadcast() { log_gossip!(self.logger, "Skipping broadcast message to {:?} as its outbound buffer is full", peer.their_node_id); continue; }