gossip: Add both channel directions with their respective alias
We locally generate an update with our local alias, and get one from the peer with the remote alias, so we need to add them both. We do so only if using the alias in the first place though.
This commit is contained in:
parent
bf44178047
commit
5e74048508
|
@ -785,11 +785,9 @@ void peer_start_channeld(struct channel *channel,
|
|||
}
|
||||
|
||||
/* Artificial confirmation event for zeroconf */
|
||||
if (channel_type_has(channel->type, OPT_ZEROCONF))
|
||||
subd_send_msg(
|
||||
channel->owner,
|
||||
take(towire_channeld_funding_depth(
|
||||
NULL, channel->scid, channel->alias[LOCAL], 0)));
|
||||
subd_send_msg(channel->owner,
|
||||
take(towire_channeld_funding_depth(
|
||||
NULL, channel->scid, channel->alias[LOCAL], 0)));
|
||||
}
|
||||
|
||||
bool channel_tell_depth(struct lightningd *ld,
|
||||
|
|
|
@ -369,6 +369,18 @@ void tell_gossipd_local_private_channel(struct lightningd *ld,
|
|||
capacity,
|
||||
scid,
|
||||
features)));
|
||||
|
||||
/* If we have no real scid, and there are two different
|
||||
* aliases, then we need to add both as single direction
|
||||
* channels to the local gossip_store. */
|
||||
if ((!channel->scid && channel->alias[LOCAL]) &&
|
||||
!short_channel_id_eq(channel->alias[REMOTE],
|
||||
channel->alias[LOCAL])) {
|
||||
subd_send_msg(ld->gossip,
|
||||
take(towire_gossipd_local_private_channel(
|
||||
NULL, &channel->peer->id, capacity,
|
||||
channel->alias[LOCAL], features)));
|
||||
}
|
||||
}
|
||||
|
||||
static struct command_result *json_setleaserates(struct command *cmd,
|
||||
|
|
Loading…
Reference in New Issue