|
@ -145,7 +145,7 @@ static struct node *new_node(struct routing_state *rstate, |
|
|
n = tal(rstate, struct node); |
|
|
n = tal(rstate, struct node); |
|
|
n->id = *id; |
|
|
n->id = *id; |
|
|
n->chans = tal_arr(n, struct chan *, 0); |
|
|
n->chans = tal_arr(n, struct chan *, 0); |
|
|
n->gfeatures = NULL; |
|
|
n->globalfeatures = NULL; |
|
|
n->node_announcement = NULL; |
|
|
n->node_announcement = NULL; |
|
|
n->node_announcement_index = 0; |
|
|
n->node_announcement_index = 0; |
|
|
n->last_timestamp = -1; |
|
|
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; |
|
|
node->last_timestamp = timestamp; |
|
|
memcpy(node->rgb_color, rgb_color, ARRAY_SIZE(node->rgb_color)); |
|
|
memcpy(node->rgb_color, rgb_color, ARRAY_SIZE(node->rgb_color)); |
|
|
memcpy(node->alias, alias, ARRAY_SIZE(node->alias)); |
|
|
memcpy(node->alias, alias, ARRAY_SIZE(node->alias)); |
|
|
tal_free(node->gfeatures); |
|
|
tal_free(node->globalfeatures); |
|
|
node->gfeatures = tal_steal(node, features); |
|
|
node->globalfeatures = tal_steal(node, features); |
|
|
|
|
|
|
|
|
tal_free(node->node_announcement); |
|
|
tal_free(node->node_announcement); |
|
|
node->node_announcement = tal_dup_arr(node, u8, msg, tal_count(msg), 0); |
|
|
node->node_announcement = tal_dup_arr(node, u8, msg, tal_count(msg), 0); |
|
|