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

Function htlc_offer_timeout

lightningd/peer_htlcs.c:725–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725static void htlc_offer_timeout(struct htlc_out *out)
726{
727 struct channel *channel = out->key.channel;
728
729 out->timeout = NULL;
730
731 /* Otherwise, timer would be removed. */
732 assert(out->hstate == SENT_ADD_HTLC);
733
734 /* If owner died, we should already be taken care of. */
735 if (!channel->owner || !channel_state_can_add_htlc(channel->state))
736 return;
737
738 log_unusual(channel->owner->log,
739 "Adding HTLC %"PRIu64" too slow: killing connection",
740 out->key.id);
741 channel_fail_transient(channel, true,
742 "Adding HTLC timed out: killed connection");
743}
744
745/* Returns failmsg, or NULL on success. */
746const u8 *send_htlc_out(const tal_t *ctx,

Callers

nothing calls this directly

Calls 2

channel_fail_transientFunction · 0.70

Tested by

no test coverage detected