diff --git a/common/features.h b/common/features.h index edc66e85a..1cda1d168 100644 --- a/common/features.h +++ b/common/features.h @@ -5,7 +5,7 @@ #include /* Returns true if we're OK with all these offered features. */ -bool features_supported(const u8 *gfeatures, const u8 *lfeatures); +bool features_supported(const u8 *globalfeatures, const u8 *localfeatures); /* For sending our features: tal_count() returns length. */ u8 *get_offered_globalfeatures(const tal_t *ctx); diff --git a/gossipd/gossip_wire.csv b/gossipd/gossip_wire.csv index 23a5cf360..1f893df3f 100644 --- a/gossipd/gossip_wire.csv +++ b/gossipd/gossip_wire.csv @@ -8,7 +8,7 @@ gossipctl_init,,broadcast_interval,u32 gossipctl_init,,chain_hash,struct bitcoin_blkid gossipctl_init,,id,struct pubkey gossipctl_init,,gflen,u16 -gossipctl_init,,gfeatures,gflen*u8 +gossipctl_init,,globalfeatures,gflen*u8 gossipctl_init,,rgb,3*u8 gossipctl_init,,alias,32*u8 gossipctl_init,,update_channel_interval,u32 diff --git a/gossipd/gossipd.c b/gossipd/gossipd.c index 7bc605854..d83a2a756 100644 --- a/gossipd/gossipd.c +++ b/gossipd/gossipd.c @@ -367,7 +367,7 @@ static bool node_announcement_redundant(struct daemon *daemon) return false; if (!memeq(daemon->globalfeatures, tal_count(daemon->globalfeatures), - n->gfeatures, tal_count(n->gfeatures))) + n->globalfeatures, tal_count(n->globalfeatures))) return false; return true; @@ -1469,12 +1469,12 @@ static struct io_plan *getnodes(struct io_conn *conn, struct daemon *daemon, if (id) { n = get_node(daemon->rstate, id); if (n) - append_node(&nodes, id, n->gfeatures, n); + append_node(&nodes, id, n->globalfeatures, n); } else { struct node_map_iter i; n = node_map_first(daemon->rstate->nodes, &i); while (n != NULL) { - append_node(&nodes, &n->id, n->gfeatures, n); + append_node(&nodes, &n->id, n->globalfeatures, n); n = node_map_next(daemon->rstate->nodes, &i); } } diff --git a/gossipd/routing.c b/gossipd/routing.c index 80d8547a0..52c63769f 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -145,7 +145,7 @@ static struct node *new_node(struct routing_state *rstate, n = tal(rstate, struct node); n->id = *id; n->chans = tal_arr(n, struct chan *, 0); - n->gfeatures = NULL; + n->globalfeatures = NULL; n->node_announcement = NULL; n->node_announcement_index = 0; n->last_timestamp = -1; @@ -1307,8 +1307,8 @@ bool routing_add_node_announcement(struct routing_state *rstate, const u8 *msg T node->last_timestamp = timestamp; memcpy(node->rgb_color, rgb_color, ARRAY_SIZE(node->rgb_color)); memcpy(node->alias, alias, ARRAY_SIZE(node->alias)); - tal_free(node->gfeatures); - node->gfeatures = tal_steal(node, features); + tal_free(node->globalfeatures); + node->globalfeatures = tal_steal(node, features); tal_free(node->node_announcement); node->node_announcement = tal_dup_arr(node, u8, msg, tal_count(msg), 0); diff --git a/gossipd/routing.h b/gossipd/routing.h index ca036db97..fe48b9b9f 100644 --- a/gossipd/routing.h +++ b/gossipd/routing.h @@ -117,7 +117,7 @@ struct node { u8 rgb_color[3]; /* (Global) features */ - u8 *gfeatures; + u8 *globalfeatures; /* Cached `node_announcement` we might forward to new peers (or NULL). */ const u8 *node_announcement;