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

@@ -356,7 +356,9 @@ int main(int argc, char *argv[])
assert(short_channel_id_from_str("103x1x0", 7, &scid23));
assert(short_channel_id_from_str("110x1x1", 7, &scid12));
assert(gossmap_find_chan(map, &scid23));
assert(!gossmap_find_chan(map, &scid23)->private);
assert(gossmap_find_chan(map, &scid12));
assert(gossmap_find_chan(map, &scid12)->private);
/* Now, let's add a new channel l1 -> l4. */
mods = gossmap_localmods_new(tmpctx);