diff --git a/common/gossmap.c b/common/gossmap.c index 5c54dd835d9d..bec5dea27eae 100644 --- a/common/gossmap.c +++ b/common/gossmap.c @@ -17,8 +17,6 @@ #include #include -bool gossmap_public_only; - /* We need this global to decode indexes for hash functions */ static struct gossmap *map; @@ -638,12 +636,8 @@ static bool map_catchup(struct gossmap *map, size_t *num_rejected) type = map_be16(map, off); if (type == WIRE_CHANNEL_ANNOUNCEMENT) add_channel(map, off, false); - else if (type == WIRE_GOSSIP_STORE_PRIVATE_CHANNEL && !gossmap_public_only) - add_channel(map, off + 2 + 8 + 2, true); else if (type == WIRE_CHANNEL_UPDATE) num_bad += !update_channel(map, off); - else if (type == WIRE_GOSSIP_STORE_PRIVATE_UPDATE && !gossmap_public_only) - num_bad += !update_channel(map, off + 2 + 2); else if (type == WIRE_GOSSIP_STORE_DELETE_CHAN) remove_channel_by_deletemsg(map, off); else if (type == WIRE_NODE_ANNOUNCEMENT) diff --git a/common/gossmap.h b/common/gossmap.h index 19f87d0e4d36..b173c9bd5515 100644 --- a/common/gossmap.h +++ b/common/gossmap.h @@ -40,9 +40,6 @@ struct gossmap_chan { } half[2]; }; -/* Temporary flag for testing: don't load private gossip info! */ -extern bool gossmap_public_only; - /* If num_channel_updates_rejected is not NULL, indicates how many channels we * marked inactive because their values were too high to be represented. */ struct gossmap *gossmap_load(const tal_t *ctx, const char *filename, diff --git a/plugins/fetchinvoice.c b/plugins/fetchinvoice.c index f82a80300c07..65436f7e203a 100644 --- a/plugins/fetchinvoice.c +++ b/plugins/fetchinvoice.c @@ -1577,8 +1577,6 @@ static const struct plugin_hook hooks[] = { int main(int argc, char *argv[]) { setup_locale(); - /* We are migrated, ready for public-only gossmap! */ - gossmap_public_only = true; plugin_main(argv, init, PLUGIN_RESTARTABLE, true, NULL, commands, ARRAY_SIZE(commands), /* No notifications */ diff --git a/plugins/keysend.c b/plugins/keysend.c index 17e39fd026c7..c53cd4b7f336 100644 --- a/plugins/keysend.c +++ b/plugins/keysend.c @@ -611,8 +611,6 @@ int main(int argc, char *argv[]) features->bits[i] = tal_arr(features, u8, 0); set_feature_bit(&features->bits[NODE_ANNOUNCE_FEATURE], KEYSEND_FEATUREBIT); - /* We are migrated, ready for public-only gossmap! */ - gossmap_public_only = true; plugin_main(argv, init, PLUGIN_STATIC, true, features, commands, ARRAY_SIZE(commands), NULL, 0, hooks, ARRAY_SIZE(hooks), notification_topics, ARRAY_SIZE(notification_topics), NULL); diff --git a/plugins/pay.c b/plugins/pay.c index d162e70bf512..153d86a32ba7 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1300,8 +1300,6 @@ static const char *notification_topics[] = { int main(int argc, char *argv[]) { setup_locale(); - /* We are migrated, ready for public-only gossmap! */ - gossmap_public_only = true; plugin_main(argv, init, PLUGIN_RESTARTABLE, true, NULL, commands, ARRAY_SIZE(commands), NULL, 0, NULL, 0, notification_topics, ARRAY_SIZE(notification_topics), diff --git a/plugins/renepay/pay.c b/plugins/renepay/pay.c index 3383be8a318d..5fc6d0a61405 100644 --- a/plugins/renepay/pay.c +++ b/plugins/renepay/pay.c @@ -1339,9 +1339,6 @@ int main(int argc, char *argv[]) pay_plugin = tal(NULL, struct pay_plugin); pay_plugin->debug_mcf = pay_plugin->debug_payflow = false; - /* We are migrated, ready for public-only gossmap! */ - gossmap_public_only = true; - plugin_main( argv, init, diff --git a/plugins/topology.c b/plugins/topology.c index aafca3d831e2..7bc337faa129 100644 --- a/plugins/topology.c +++ b/plugins/topology.c @@ -23,14 +23,9 @@ static struct node_id local_id; static struct plugin *plugin; /* We load this on demand, since we can start before gossipd. */ -static struct gossmap *get_gossmap(bool public_only) +static struct gossmap *get_gossmap(void) { - /* Temporary hack so callers can individually exclude private gossip */ - tal_free(global_gossmap); - gossmap_public_only = public_only; - global_gossmap = gossmap_load(NULL, - GOSSIP_STORE_FILENAME, - NULL); + gossmap_refresh(global_gossmap, NULL); return global_gossmap; } @@ -170,7 +165,7 @@ listpeerchannels_getroute_done(struct command *cmd, gossmod_add_localchan, NULL); /* Overlay local knowledge for dijkstra */ - gossmap = get_gossmap(true); + gossmap = get_gossmap(); gossmap_apply_localmods(gossmap, mods); res = try_route(cmd, gossmap, info); gossmap_remove_localmods(gossmap, mods); @@ -359,7 +354,7 @@ static struct command_result *listpeerchannels_done(struct command *cmd, struct node_map *connected; struct gossmap_chan *c; struct json_stream *js; - struct gossmap *gossmap = get_gossmap(true); + struct gossmap *gossmap = get_gossmap(); connected = local_connected(opts, buf, result); @@ -515,7 +510,7 @@ static struct command_result *json_listnodes(struct command *cmd, NULL)) return command_param_failed(); - gossmap = get_gossmap(true); + gossmap = get_gossmap(); js = jsonrpc_stream_success(cmd); json_array_start(js, "nodes"); if (id) { @@ -576,7 +571,7 @@ listpeerchannels_listincoming_done(struct command *cmd, NULL); /* Overlay local knowledge */ - gossmap = get_gossmap(true); + gossmap = get_gossmap(); gossmap_apply_localmods(gossmap, mods); js = jsonrpc_stream_success(cmd);