Skip to content

Commit df27fc5

Browse files
committed
More renaming of gfeatures to globalfeatures.
Use the BOLT #1 naming. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent f2488fb commit df27fc5

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

common/features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <ccan/tal/tal.h>
66

77
/* Returns true if we're OK with all these offered features. */
8-
bool features_supported(const u8 *gfeatures, const u8 *lfeatures);
8+
bool features_supported(const u8 *globalfeatures, const u8 *localfeatures);
99

1010
/* For sending our features: tal_count() returns length. */
1111
u8 *get_offered_globalfeatures(const tal_t *ctx);

gossipd/gossip_wire.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gossipctl_init,,broadcast_interval,u32
88
gossipctl_init,,chain_hash,struct bitcoin_blkid
99
gossipctl_init,,id,struct pubkey
1010
gossipctl_init,,gflen,u16
11-
gossipctl_init,,gfeatures,gflen*u8
11+
gossipctl_init,,globalfeatures,gflen*u8
1212
gossipctl_init,,rgb,3*u8
1313
gossipctl_init,,alias,32*u8
1414
gossipctl_init,,update_channel_interval,u32

gossipd/gossipd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static bool node_announcement_redundant(struct daemon *daemon)
367367
return false;
368368

369369
if (!memeq(daemon->globalfeatures, tal_count(daemon->globalfeatures),
370-
n->gfeatures, tal_count(n->gfeatures)))
370+
n->globalfeatures, tal_count(n->globalfeatures)))
371371
return false;
372372

373373
return true;
@@ -1469,12 +1469,12 @@ static struct io_plan *getnodes(struct io_conn *conn, struct daemon *daemon,
14691469
if (id) {
14701470
n = get_node(daemon->rstate, id);
14711471
if (n)
1472-
append_node(&nodes, id, n->gfeatures, n);
1472+
append_node(&nodes, id, n->globalfeatures, n);
14731473
} else {
14741474
struct node_map_iter i;
14751475
n = node_map_first(daemon->rstate->nodes, &i);
14761476
while (n != NULL) {
1477-
append_node(&nodes, &n->id, n->gfeatures, n);
1477+
append_node(&nodes, &n->id, n->globalfeatures, n);
14781478
n = node_map_next(daemon->rstate->nodes, &i);
14791479
}
14801480
}

gossipd/routing.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static struct node *new_node(struct routing_state *rstate,
145145
n = tal(rstate, struct node);
146146
n->id = *id;
147147
n->chans = tal_arr(n, struct chan *, 0);
148-
n->gfeatures = NULL;
148+
n->globalfeatures = NULL;
149149
n->node_announcement = NULL;
150150
n->node_announcement_index = 0;
151151
n->last_timestamp = -1;
@@ -1307,8 +1307,8 @@ bool routing_add_node_announcement(struct routing_state *rstate, const u8 *msg T
13071307
node->last_timestamp = timestamp;
13081308
memcpy(node->rgb_color, rgb_color, ARRAY_SIZE(node->rgb_color));
13091309
memcpy(node->alias, alias, ARRAY_SIZE(node->alias));
1310-
tal_free(node->gfeatures);
1311-
node->gfeatures = tal_steal(node, features);
1310+
tal_free(node->globalfeatures);
1311+
node->globalfeatures = tal_steal(node, features);
13121312

13131313
tal_free(node->node_announcement);
13141314
node->node_announcement = tal_dup_arr(node, u8, msg, tal_count(msg), 0);

gossipd/routing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct node {
117117
u8 rgb_color[3];
118118

119119
/* (Global) features */
120-
u8 *gfeatures;
120+
u8 *globalfeatures;
121121

122122
/* Cached `node_announcement` we might forward to new peers (or NULL). */
123123
const u8 *node_announcement;

0 commit comments

Comments
 (0)