Skip to content

Commit

Permalink
More renaming of gfeatures to globalfeatures.
Browse files Browse the repository at this point in the history
Use the BOLT #1 naming.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Sep 28, 2018
1 parent 9455331 commit d66f5f3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ccan/tal/tal.h>

/* 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);
Expand Down
2 changes: 1 addition & 1 deletion gossipd/gossip_wire.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions gossipd/gossipd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1429,12 +1429,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);
}
}
Expand Down
6 changes: 3 additions & 3 deletions gossipd/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static struct node *new_node(struct routing_state *rstate,
n->id = *id;
n->chans = tal_arr(n, struct chan *, 0);
n->alias = NULL;
n->gfeatures = NULL;
n->globalfeatures = NULL;
n->node_announcement = NULL;
n->node_announcement_index = 0;
n->last_timestamp = -1;
Expand Down Expand Up @@ -1309,8 +1309,8 @@ bool routing_add_node_announcement(struct routing_state *rstate, const u8 *msg T
memcpy(node->rgb_color, rgb_color, 3);
tal_free(node->alias);
node->alias = tal_dup_arr(node, u8, alias, 32, 0);
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);
Expand Down
2 changes: 1 addition & 1 deletion gossipd/routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d66f5f3

Please sign in to comment.