gossmap: add callback for gossipd to see dying messages.
gossmap doesn't care, so gossipd currently has to iterate through the store to find them at startup. Create a callback for gossipd to use instead. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -464,7 +464,9 @@ static bool setup_gossmap(struct gossmap_manage *gm,
|
||||
/* This actually loads it into memory, with strict checks. */
|
||||
gm->raw_gossmap = gossmap_load_initial(gm, GOSSIP_STORE_FILENAME,
|
||||
expected_len,
|
||||
gossmap_logcb, daemon);
|
||||
gossmap_logcb,
|
||||
NULL,
|
||||
daemon);
|
||||
if (!gm->raw_gossmap) {
|
||||
gm->gs = tal_free(gm->gs);
|
||||
return false;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <common/sciddir_or_pubkey.h>
|
||||
#include <common/setup.h>
|
||||
#include <common/wireaddr.h>
|
||||
#include <common/gossip_store_wiregen.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* AUTOGENERATED MOCKS START */
|
||||
@@ -19,6 +20,9 @@ struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id
|
||||
struct peer *first_random_peer(struct daemon *daemon UNNEEDED,
|
||||
struct peer_node_id_map_iter *it UNNEEDED)
|
||||
{ fprintf(stderr, "first_random_peer called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_gossip_store_chan_dying */
|
||||
bool fromwire_gossip_store_chan_dying(const void *p UNNEEDED, struct short_channel_id *scid UNNEEDED, u32 *blockheight UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_gossip_store_chan_dying called!\n"); abort(); }
|
||||
/* Generated stub for gossmap_manage_get_gossmap */
|
||||
struct gossmap *gossmap_manage_get_gossmap(struct gossmap_manage *gm UNNEEDED)
|
||||
{ fprintf(stderr, "gossmap_manage_get_gossmap called!\n"); abort(); }
|
||||
|
||||
Reference in New Issue
Block a user