MCPcopy Create free account
hub / github.com/ElementsProject/lightning / gossip_stream_timer

Function gossip_stream_timer

connectd/multiplex.c:202–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200static void wake_gossip(struct peer *peer);
201
202static struct oneshot *gossip_stream_timer(struct peer *peer)
203{
204 u32 next;
205
206 /* BOLT #7:
207 *
208 * A node:
209 *...
210 * - SHOULD flush outgoing gossip messages once every 60 seconds,
211 * independently of the arrival times of the messages.
212 * - Note: this results in staggered announcements that are unique
213 * (not duplicated).
214 */
215 /* We shorten this for dev_fast_gossip! */
216 next = GOSSIP_FLUSH_INTERVAL(peer->daemon->dev_fast_gossip);
217
218 return new_reltimer(&peer->daemon->timers,
219 peer, time_from_sec(next),
220 wake_gossip, peer);
221}
222
223/* Statistically, how many peers to we tell about each channel? */
224#define GOSSIP_SPAM_REDUNDANCY 50

Callers 1

wake_gossipFunction · 0.85

Calls 1

time_from_secFunction · 0.85

Tested by

no test coverage detected