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

Function enable_gossip_stream

gossipd/seeker.c:207–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static void enable_gossip_stream(struct seeker *seeker, struct peer *peer)
208{
209 /* We seek some way back, to take into account propagation time */
210 const u32 polltime = GOSSIP_SEEKER_INTERVAL(seeker) * 10;
211 u32 start = seeker->daemon->rstate->last_timestamp;
212 u8 *msg;
213
214 if (start > polltime)
215 start -= polltime;
216 else
217 start = 0;
218
219 status_peer_debug(&peer->id, "seeker: starting gossip");
220
221 /* This is allowed even if they don't understand it (odd) */
222 msg = towire_gossip_timestamp_filter(NULL,
223 &chainparams->genesis_blockhash,
224 start,
225 UINT32_MAX);
226 queue_peer_msg(peer, take(msg));
227}
228
229static void normal_gossip_start(struct seeker *seeker, struct peer *peer)
230{

Callers 2

normal_gossip_startFunction · 0.85
maybe_rotate_gossipersFunction · 0.85

Calls 1

queue_peer_msgFunction · 0.70

Tested by

no test coverage detected