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

Function send_disconnected

connectd/connectd.c:274–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void send_disconnected(struct daemon *daemon,
275 const struct node_id *id,
276 u64 connectd_counter,
277 struct timemono starttime)
278{
279 /* lightningd: it's gone */
280 daemon_conn_send(daemon->master,
281 take(towire_connectd_peer_disconnected(NULL, id, connectd_counter, time_to_nsec(timemono_since(starttime)))));
282
283 /* Tell gossipd to stop asking this peer gossip queries */
284 daemon_conn_send(daemon->gossipd,
285 take(towire_gossipd_peer_gone(NULL, id)));
286
287 /* Start reconnection process if we care */
288 schedule_reconnect_if_important(daemon, id);
289}
290
291/*~ Note the lack of static: this is called by peer_exchange_initmsg.c once the
292 * INIT messages are exchanged, and also by the retry code above. */

Callers 2

destroy_peer_connFunction · 0.85
peer_connectedFunction · 0.85

Calls 4

daemon_conn_sendFunction · 0.85
time_to_nsecFunction · 0.85
timemono_sinceFunction · 0.85

Tested by

no test coverage detected