mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
status: suppress status_trace/status_debug messages if queue too long.
We can be spammy, which is good for tests, but bad for our simple message queue. This avoids breaking our tests but also avoid the worst case (1M entries and counting!) for gossip status messages in the case where we're syncing a large peer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
e3bac6c165
commit
ec658c1f89
@@ -15,6 +15,9 @@ struct msg_queue *msg_queue_new(const tal_t *ctx);
|
||||
/* If add is taken(), freed after sending. msg_wake() implied. */
|
||||
void msg_enqueue(struct msg_queue *q, const u8 *add TAKES);
|
||||
|
||||
/* Get current queue length */
|
||||
size_t msg_queue_length(const struct msg_queue *q);
|
||||
|
||||
/* Fd is closed after sending. msg_wake() implied. */
|
||||
void msg_enqueue_fd(struct msg_queue *q, int fd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user