From 851ade1db4a3d25caa388872038220185a71f840 Mon Sep 17 00:00:00 2001 From: wqxoxo Date: Fri, 28 Nov 2025 16:28:32 +0000 Subject: [PATCH] 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". --- plugins/xpay/xpay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/xpay/xpay.c b/plugins/xpay/xpay.c index 70001888d69c..43b381ebc1e8 100644 --- a/plugins/xpay/xpay.c +++ b/plugins/xpay/xpay.c @@ -522,7 +522,9 @@ static const char *describe_scidd(struct attempt *attempt, size_t index) /* Routehint? Often they are a single hop. */ if (tal_count(payment->route_hints) == 1 - && tal_count(payment->route_hints[0]) == 1) + && tal_count(payment->route_hints[0]) == 1 + && short_channel_id_eq(scidd.scid, + payment->route_hints[0][0].short_channel_id)) return tal_fmt(tmpctx, "the invoice's route hint (%s)", fmt_short_channel_id_dir(tmpctx, &scidd));