mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
channeld: On funding_locked, remember either alias or real scid
This commit is contained in:
parent
cf51edd95b
commit
3e57d6f9d0
1 changed files with 8 additions and 2 deletions
|
@ -3235,8 +3235,14 @@ static void handle_funding_depth(struct peer *peer, const u8 *msg)
|
|||
} else {
|
||||
peer->depth_togo = 0;
|
||||
|
||||
assert(scid);
|
||||
peer->short_channel_ids[LOCAL] = *scid;
|
||||
/* If we know an actual short_channel_id prefer to use
|
||||
* that, otherwise fill in the alias. From channeld's
|
||||
* point of view switching from zeroconf to an actual
|
||||
* funding scid is just a reorg. */
|
||||
if (scid)
|
||||
peer->short_channel_ids[LOCAL] = *scid;
|
||||
else if (alias_local)
|
||||
peer->short_channel_ids[LOCAL] = *alias_local;
|
||||
|
||||
if (!peer->funding_locked[LOCAL]) {
|
||||
status_debug("funding_locked: sending commit index"
|
||||
|
|
Loading…
Add table
Reference in a new issue