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

Function connectd_connect_to_peer

lightningd/connect_control.c:473–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void connectd_connect_to_peer(struct lightningd *ld,
474 const struct peer *peer,
475 const char *reason,
476 bool is_important)
477{
478 /* Give connectd an address if we know it. */
479 struct wireaddr_internal *waddr;
480 if (peer->last_known_addr) {
481 waddr = tal(tmpctx, struct wireaddr_internal);
482 wireaddr_internal_from_wireaddr(waddr, peer->last_known_addr);
483 } else {
484 waddr = NULL;
485 }
486 subd_send_msg(peer->ld->connectd,
487 take(towire_connectd_connect_to_peer(NULL, &peer->id,
488 waddr,
489 !is_important,
490 reason)));
491}
492
493void tell_connectd_peer_importance(struct peer *peer,
494 bool was_important)

Callers 2

setup_peerFunction · 0.70

Calls 2

subd_send_msgFunction · 0.70

Tested by

no test coverage detected