mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 06:55:13 +01:00
gossmap: make local_addchan create private channel_announcement in correct order.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
016e332304
commit
4cdb4167d2
1 changed files with 10 additions and 0 deletions
|
@ -771,6 +771,16 @@ bool gossmap_local_addchan(struct gossmap_localmods *localmods,
|
||||||
if (find_localmod(localmods, scid))
|
if (find_localmod(localmods, scid))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* BOLT #7:
|
||||||
|
*
|
||||||
|
* - MUST set `node_id_1` and `node_id_2` to the public keys
|
||||||
|
* of the two nodes operating the channel, such that
|
||||||
|
* `node_id_1` is the lexicographically-lesser of the two
|
||||||
|
* compressed keys sorted in ascending lexicographic order.
|
||||||
|
*/
|
||||||
|
if (node_id_cmp(n1, n2) > 0)
|
||||||
|
return gossmap_local_addchan(localmods, n2, n1, scid, features);
|
||||||
|
|
||||||
mod.scid = *scid;
|
mod.scid = *scid;
|
||||||
mod.updates_set[0] = mod.updates_set[1] = false;
|
mod.updates_set[0] = mod.updates_set[1] = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue