lightningd: consider old scids when looking up channels (for routing).

Changelog-Fixed: Protocol: we now allow routing through old short-channel-ids once a splice is done (previously we would refuse, leading to a 6 block gap in service).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-08-14 12:40:11 +09:30
parent 4abd0af3ec
commit d70fc13b54
2 changed files with 7 additions and 1 deletions

View File

@@ -793,6 +793,12 @@ struct channel *any_channel_by_scid(struct lightningd *ld,
if (chan->scid
&& short_channel_id_eq(scid, *chan->scid))
return chan;
/* Look through any old pre-splice channel ids */
for (size_t i = 0; i < tal_count(chan->old_scids); i++) {
if (short_channel_id_eq(scid, chan->old_scids[i]))
return chan;
}
}
}
return NULL;