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".
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user