Skip to content

Commit 49bf028

Browse files
committed
Clarify comment on BUFFER_DRAIN_MSGS_PER_TICK.
1 parent a233eac commit 49bf028

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/peer_handler.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ const MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER: i8 = 4;
323323
/// tick. Once we have sent this many messages since the last ping, we send a ping right away to
324324
/// ensures we don't just fill up our send buffer and leave the peer with too many messages to
325325
/// process before the next ping.
326+
///
327+
/// Note that we continue responding to other messages even after we've sent this many messages, so
328+
/// its more of a general guideline used for gossip backfill (and gossip forwarding, times
329+
/// [`FORWARD_INIT_SYNC_BUFFER_LIMIT_RATIO`]) than a hard limit.
326330
const BUFFER_DRAIN_MSGS_PER_TICK: usize = 32;
327331

328332
struct Peer {

0 commit comments

Comments
 (0)