mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-10 17:44:22 +01:00
gossipd: Use the remote alias if no real scid is known
This is for the local channel announcement that'll not leave this host, as it doesn't have signatures.
This commit is contained in:
@@ -348,15 +348,26 @@ void tell_gossipd_local_private_channel(struct lightningd *ld,
|
||||
struct amount_sat capacity,
|
||||
const u8 *features)
|
||||
{
|
||||
/* Which short_channel_id should we use to refer to this channel when
|
||||
* creating invoices? */
|
||||
const struct short_channel_id *scid;
|
||||
|
||||
/* As we're shutting down, ignore */
|
||||
if (!ld->gossip)
|
||||
return;
|
||||
|
||||
if (channel->scid != NULL) {
|
||||
scid = channel->scid;
|
||||
} else {
|
||||
scid = channel->alias[REMOTE];
|
||||
}
|
||||
|
||||
assert(scid != NULL);
|
||||
subd_send_msg(ld->gossip,
|
||||
take(towire_gossipd_local_private_channel
|
||||
(NULL, &channel->peer->id,
|
||||
capacity,
|
||||
channel->scid,
|
||||
scid,
|
||||
features)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user