mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-29 03:44:30 +01:00
dump_our_gossip() is mainly useful for propagating our gossip when we are poorly connected, not when we have many peers. @whitslack reported excessive memory use queueing messages on a large node, so we limit it beyond the first 5 peers, to 5 channels each. This assumes we have ~ the same number of peers as channels, which is probably reasonable. In the long term, we should move this to connectd, which is properly equipped to trickle out these messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Fixes: #6540