Skip to content

Commit

Permalink
lightningd: tell gossipd channel is closed if it tells us about our c…
Browse files Browse the repository at this point in the history
…hannel and is wrong.

While we have (I hope!) fixed the underlying sync problem, this can still happen with
older gossip.  So now we tell it the channel is dead, so it won't happen more than once.

Fixes: #7703
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Nov 18, 2024
1 parent 05fbcb4 commit 78186ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lightningd/gossip_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,13 @@ static void handle_init_cupdate(struct lightningd *ld, const u8 *msg)

channel = any_channel_by_scid(ld, scid, true);
if (!channel) {
log_broken(ld->log, "init_cupdate for unknown scid %s",
log_broken(ld->log, "init_cupdate for unknown scid %s: telling gossipd it's spent",
fmt_short_channel_id(tmpctx, scid));
/* Presumably gossipd missed that it was already spent, so
* tell it now! (We need a tal object for this, hence
* tal_dup) */
gossipd_notify_spends(ld, ld->gossip_blockheight,
tal_dup(tmpctx, struct short_channel_id, &scid));
return;
}

Expand Down

0 comments on commit 78186ae

Please sign in to comment.