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

Function send_disconnected

connectd/connectd.c:278–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278void send_disconnected(struct daemon *daemon,
279 const struct node_id *id,
280 u64 connectd_counter,
281 struct timemono starttime)
282{
283 /* lightningd: it's gone */
284 daemon_conn_send(daemon->master,
285 take(towire_connectd_peer_disconnected(NULL, id, connectd_counter, time_to_nsec(timemono_since(starttime)))));
286
287 /* Tell gossipd to stop asking this peer gossip queries */
288 daemon_conn_send(daemon->gossipd,
289 take(towire_gossipd_peer_gone(NULL, id)));
290
291 /* Start reconnection process if we care */
292 schedule_reconnect_if_important(daemon, id);
293}
294
295/*~ Note the lack of static: this is called by peer_exchange_initmsg.c once the
296 * 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