@@ -398,12 +398,13 @@ impl Peer {
398398 }
399399
400400 /// Returns whether this peer's buffer is full and we should drop gossip messages.
401- fn buffer_full_drop_gossip ( & self ) -> bool {
401+ fn buffer_full_drop_gossip_broadcast ( & self ) -> bool {
402402 if self . pending_outbound_buffer . len ( ) > OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP
403403 || self . msgs_sent_since_pong > BUFFER_DRAIN_MSGS_PER_TICK * FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO {
404404 return false
405+ return true
405406 }
406- true
407+ false
407408 }
408409}
409410
@@ -1325,7 +1326,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
13251326 !peer. should_forward_channel_announcement ( msg. contents . short_channel_id ) {
13261327 continue
13271328 }
1328- if peer. buffer_full_drop_gossip ( ) {
1329+ if peer. buffer_full_drop_gossip_broadcast ( ) {
13291330 log_gossip ! ( self . logger, "Skipping broadcast message to {:?} as its outbound buffer is full" , peer. their_node_id) ;
13301331 continue ;
13311332 }
@@ -1349,7 +1350,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
13491350 !peer. should_forward_node_announcement ( msg. contents . node_id ) {
13501351 continue
13511352 }
1352- if peer. buffer_full_drop_gossip ( ) {
1353+ if peer. buffer_full_drop_gossip_broadcast ( ) {
13531354 log_gossip ! ( self . logger, "Skipping broadcast message to {:?} as its outbound buffer is full" , peer. their_node_id) ;
13541355 continue ;
13551356 }
@@ -1372,7 +1373,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, L: Deref, CMH: Deref> P
13721373 !peer. should_forward_channel_announcement ( msg. contents . short_channel_id ) {
13731374 continue
13741375 }
1375- if peer. buffer_full_drop_gossip ( ) {
1376+ if peer. buffer_full_drop_gossip_broadcast ( ) {
13761377 log_gossip ! ( self . logger, "Skipping broadcast message to {:?} as its outbound buffer is full" , peer. their_node_id) ;
13771378 continue ;
13781379 }
0 commit comments