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

Function gossip_stream_timer

connectd/multiplex.c:190–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188static void wake_gossip(struct peer *peer);
189
190static struct oneshot *gossip_stream_timer(struct peer *peer)
191{
192 u32 next;
193
194 /* BOLT #7:
195 *
196 * A node:
197 *...
198 * - SHOULD flush outgoing gossip messages once every 60 seconds,
199 * independently of the arrival times of the messages.
200 * - Note: this results in staggered announcements that are unique
201 * (not duplicated).
202 */
203 /* We shorten this for dev_fast_gossip! */
204 next = GOSSIP_FLUSH_INTERVAL(peer->daemon->dev_fast_gossip);
205
206 return new_reltimer(&peer->daemon->timers,
207 peer, time_from_sec(next),
208 wake_gossip, peer);
209}
210
211/* It's so common to ask for "recent" gossip (we ask for 10 minutes
212 * ago, LND and Eclair ask for now, LDK asks for 1 hour ago) that it's

Callers 2

setup_peer_gossip_storeFunction · 0.85
wake_gossipFunction · 0.85

Calls 1

time_from_secFunction · 0.85

Tested by

no test coverage detected