gossmap: remembers when a channel is private.

Steals one bit from the scid_off, and turns that into a relative
offset.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-05-22 14:30:22 +09:30
parent cc198748d4
commit eb370ab8ff
3 changed files with 28 additions and 19 deletions

View File

@@ -19,8 +19,9 @@ struct gossmap_node {
struct gossmap_chan {
u32 cann_off;
/* Technically redundant, but we have a hole anyway. */
u32 scid_off;
u32 private: 1;
/* Technically redundant, but we have a hole anyway: from cann_off */
u32 plus_scid_off: 31;
/* two nodes we connect (lesser idx first) */
struct half_chan {
/* Top bit indicates it's enabled */