Skip to content

Commit 3c08a8b

Browse files
wqxoxorustyrussell
authored andcommitted
xpay: fix misleading "route hint" label in error messages
describe_scidd() was labeling any channel as "the invoice's route hint" when there was a single-hop route hint, even if the error occurred on an unrelated intermediate channel. Now we check the channel actually matches the route hint's short_channel_id before using that label. Fixes: #8252 Changelog-Fixed: xpay: error messages no longer incorrectly label intermediate channels as "the invoice's route hint".
1 parent 9d4a150 commit 3c08a8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/xpay/xpay.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,9 @@ static const char *describe_scidd(struct attempt *attempt, size_t index)
522522

523523
/* Routehint? Often they are a single hop. */
524524
if (tal_count(payment->route_hints) == 1
525-
&& tal_count(payment->route_hints[0]) == 1)
525+
&& tal_count(payment->route_hints[0]) == 1
526+
&& short_channel_id_eq(scidd.scid,
527+
payment->route_hints[0][0].short_channel_id))
526528
return tal_fmt(tmpctx, "the invoice's route hint (%s)",
527529
fmt_short_channel_id_dir(tmpctx, &scidd));
528530

0 commit comments

Comments
 (0)