Skip to content

Commit

Permalink
ld: Use the local alias when reporting failures with zeroconf
Browse files Browse the repository at this point in the history
Ran into this with a zeroconf channel, without confs, that was
disconnected.
  • Loading branch information
cdecker committed Jun 7, 2022
1 parent d9cae6b commit 2382d3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightningd/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,10 @@ send_payment_core(struct lightningd *ld,
group, channel, &hout);

if (failmsg) {
fail = immediate_routing_failure(cmd, ld,
fromwire_peektype(failmsg),
channel->scid,
&channel->peer->id);
fail = immediate_routing_failure(
cmd, ld, fromwire_peektype(failmsg),
channel->scid ? channel->scid : channel->alias[LOCAL],
&channel->peer->id);

return sendpay_fail(
cmd, old_payment, PAY_TRY_OTHER_ROUTE, NULL, fail,
Expand Down

0 comments on commit 2382d3b

Please sign in to comment.