Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectd throttle #7366

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Next Next commit
lightningd: log BROKEN if we lost funds, only unusual if we closed ab…
…andoned HTLC.

Started seeing these in my logs, and it's the wrong way around!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Jun 4, 2024
commit 37f5796d6006b8cdf16173eed6fe006e55ba3650
7 changes: 4 additions & 3 deletions lightningd/peer_htlcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ static void fulfill_our_htlc_out(struct channel *channel, struct htlc_out *hout,
/* Did we abandon the incoming? Oops! */
if (hout->in->failonion) {
/* FIXME: Accounting? */
log_unusual(channel->log, "FUNDS LOSS of %s: peer took funds onchain before we could time out the HTLC, but we abandoned incoming HTLC to save the incoming channel",
log_broken(channel->log, "FUNDS LOSS of %s: peer took funds onchain before we could time out the HTLC, but we abandoned incoming HTLC to save the incoming channel",
fmt_amount_msat(tmpctx, hout->msat));
} else {
struct short_channel_id scid = channel_scid_or_local_alias(hout->key.channel);
Expand Down Expand Up @@ -1752,8 +1752,9 @@ void onchain_failed_our_htlc(const struct channel *channel,
? fromwire_peektype(hout->failmsg)
: 0);
} else {
log_broken(channel->log, "HTLC id %"PRIu64" is from nowhere?",
htlc->id);
/* This happens if we abandoned the incoming HTLC to avoid closure */
log_unusual(channel->log, "HTLC id %"PRIu64" is from nowhere: did we abandon it?",
htlc->id);

/* Immediate corruption sanity check if this happens */
htable_check(&ld->htlcs_out->raw, "onchain_failed_our_htlc out");
Expand Down
Loading