From 669bca4a02b724f9326c1afaf00732c205501979 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 29 Jun 2022 12:41:12 +0200 Subject: [PATCH] ld: Use the local alias in the `htlc_accepted` hook If we have no real short-channel-id this is the best we can do. Use the local one since we can be sure we have assigned one. --- lightningd/peer_htlcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lightningd/peer_htlcs.c b/lightningd/peer_htlcs.c index f16b0e2eb..62f075644 100644 --- a/lightningd/peer_htlcs.c +++ b/lightningd/peer_htlcs.c @@ -1069,7 +1069,9 @@ static void htlc_accepted_hook_serialize(struct htlc_accepted_hook_payload *p, json_object_end(s); json_object_start(s, "htlc"); - json_add_short_channel_id(s, "short_channel_id", hin->key.channel->scid); + json_add_short_channel_id( + s, "short_channel_id", + channel_scid_or_local_alias(hin->key.channel)); json_add_u64(s, "id", hin->key.id); if (deprecated_apis) json_add_amount_msat_only(s, "amount", hin->msat);