gossipd: make extra-sure we don't put in redundant channel_announcement messages.

We only write these in two places: one where we get a message from lightningd about
our own channel, and one where we get a reply from lightningd about a txout check.

The former case we explicitly check that we don't already have it in gossmap, so
add checks to the latter case, and give verbose detail if it's found.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-05-23 10:55:59 +09:30
committed by Vincenzo Palazzo
parent 369c0c1391
commit 744116e501
5 changed files with 48 additions and 1 deletions

View File

@@ -1444,3 +1444,9 @@ u8 *gossmap_node_get_features(const tal_t *ctx,
map_copy(map, n->nann_off + feature_len_off + 2, ret, feature_len);
return ret;
}
size_t gossmap_lengths(const struct gossmap *map, size_t *total)
{
*total = map->map_size;
return map->map_end;
}