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

Function accepter_negotiation_timeout

lightningd/dual_open_control.c:681–699  ·  view source on GitHub ↗

dualopend is blocked reading the peer and can't hear a dualopend_fail, * so we tell the peer and kill it. channel_open_failed is what makes * funder unreserve. */

Source from the content-addressed store, hash-verified

679 * so we tell the peer and kill it. channel_open_failed is what makes
680 * funder unreserve. */
681static void accepter_negotiation_timeout(struct channel *channel)
682{
683 struct lightningd *ld = channel->peer->ld;
684 const char *why = tal_fmt(tmpctx,
685 "Peer did not complete channel open"
686 " within %u seconds",
687 ld->dev_max_dualopen_negotiation_secs);
688
689 subd_send_msg(ld->connectd,
690 take(towire_connectd_peer_send_msg(NULL,
691 &channel->peer->id,
692 channel->peer->connectd_counter,
693 towire_errorfmt(tmpctx,
694 &channel->cid,
695 "%s", why))));
696 channel_cleanup_commands(channel, why);
697 channel_set_owner(channel, NULL);
698 forget_channel_open(channel, why);
699}
700
701static void
702openchannel2_hook_cb(struct openchannel2_payload *payload STEALS)

Callers

nothing calls this directly

Calls 6

towire_errorfmtFunction · 0.85
channel_set_ownerFunction · 0.85
forget_channel_openFunction · 0.85
subd_send_msgFunction · 0.70
channel_cleanup_commandsFunction · 0.70

Tested by

no test coverage detected