gossiped: rename empty_node_map() to new_node_map()

empty_node_map() sounds like a destructor. new_node_map() makes sense and is better.
This commit is contained in:
trueptolemy 2019-04-14 19:54:05 +08:00 committed by Rusty Russell
parent ee036a2e36
commit 274f156b28
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ static void destroy_unupdated_channel(struct unupdated_channel *uc,
uintmap_del(&rstate->unupdated_chanmap, uc->scid.u64);
}
static struct node_map *empty_node_map(const tal_t *ctx)
static struct node_map *new_node_map(const tal_t *ctx)
{
struct node_map *map = tal(ctx, struct node_map);
node_map_init(map);
@ -162,7 +162,7 @@ struct routing_state *new_routing_state(const tal_t *ctx,
const struct amount_sat *dev_unknown_channel_satoshis)
{
struct routing_state *rstate = tal(ctx, struct routing_state);
rstate->nodes = empty_node_map(rstate);
rstate->nodes = new_node_map(rstate);
rstate->broadcasts
= new_broadcast_state(rstate, gossip_store_new(rstate), peers);
rstate->chainparams = chainparams;