]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop broken debug assertion on peer buffer lengths 2024-11-fuzz-assert
authorMatt Corallo <git@bluematt.me>
Tue, 5 Nov 2024 16:04:08 +0000 (16:04 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 5 Nov 2024 16:05:06 +0000 (16:05 +0000)
1b711ed15f426ce40f1aa6be83d930a01ab530ba changed it so that we can
enqueue broadcast gossip messages to peers even though their buffer
is full as long as its our `ChannelMessageHandler` doing it. This
broke a debug assertion that the buffer isn't too large when
appending the broadcast message which is simply dropped here.

Found by the `full_stack_target` fuzzer.

lightning/src/ln/peer_handler.rs

index 9470346f8529c391a265eb21cf95fcc8d348a008..e2bdd6084a0922982e812f020e7df1d551b5a0c2 100644 (file)
@@ -1365,7 +1365,6 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
        /// Append a message to a peer's pending outbound/write gossip broadcast buffer
        fn enqueue_encoded_gossip_broadcast(&self, peer: &mut Peer, encoded_message: MessageBuf) {
                peer.msgs_sent_since_pong += 1;
-               debug_assert!(peer.gossip_broadcast_buffer.len() <= OUTBOUND_BUFFER_LIMIT_DROP_GOSSIP);
                peer.gossip_broadcast_buffer.push_back(encoded_message);
        }