chore: fix typo announcable -> announceable

"announcable" is a common misspelling of "announceable", see:

https://en.wiktionary.org/wiki/announcable
This commit is contained in:
Michael Schmoock
2022-02-23 17:58:41 +01:00
committed by Rusty Russell
parent 2c55c27ad4
commit e92176248e
12 changed files with 37 additions and 37 deletions

View File

@@ -1177,13 +1177,13 @@ static bool public_address(struct daemon *daemon, struct wireaddr *wireaddr)
return address_routable(wireaddr, daemon->dev_allow_localhost);
}
static void add_announcable(struct wireaddr **announcable,
const struct wireaddr *addr)
static void add_announceable(struct wireaddr **announceable,
const struct wireaddr *addr)
{
/*~ utils.h contains a convenience macro tal_arr_expand which
* reallocates a tal_arr to make it one longer, then returns a pointer
* to the (new) last element. */
tal_arr_expand(announcable, *addr);
tal_arr_expand(announceable, *addr);
}
/*~ ccan/asort provides a type-safe sorting function; it requires a comparison
@@ -1238,7 +1238,7 @@ static bool want_tor(const struct wireaddr_internal *proposed_wireaddr)
* announce, ones we announce but don't bind to, and ones we bind to and
* announce if they seem to be public addresses.
*
* This routine sorts out the mess: it populates the *announcable array,
* This routine sorts out the mess: it populates the *announceable array,
* and returns the addresses we bound to (by convention, return is allocated
* off `ctx` argument).
*
@@ -1254,7 +1254,7 @@ setup_listeners(const tal_t *ctx,
/* For each one, listen, announce or both */
const enum addr_listen_announce *proposed_listen_announce,
const char *tor_password,
struct wireaddr **announcable,
struct wireaddr **announceable,
char **errstr)
{
struct sockaddr_un addrun;
@@ -1267,7 +1267,7 @@ setup_listeners(const tal_t *ctx,
/* Start with empty arrays, for tal_arr_expand() */
listen_fds = tal_arr(ctx, const struct listen_fd *, 0);
*announcable = tal_arr(ctx, struct wireaddr, 0);
*announceable = tal_arr(ctx, struct wireaddr, 0);
/* Add addresses we've explicitly been told to *first*: implicit
* addresses will be discarded then if we have multiple. */
@@ -1282,7 +1282,7 @@ setup_listeners(const tal_t *ctx,
/* You can only announce wiretypes, not internal formats! */
assert(proposed_wireaddr[i].itype
== ADDR_INTERNAL_WIREADDR);
add_announcable(announcable, &wa.u.wireaddr);
add_announceable(announceable, &wa.u.wireaddr);
}
/* Now look for listening addresses. */
@@ -1338,8 +1338,8 @@ setup_listeners(const tal_t *ctx,
tal_steal(listen_fds, lfd));
if (announce
&& public_address(daemon, &wa.u.wireaddr))
add_announcable(announcable,
&wa.u.wireaddr);
add_announceable(announceable,
&wa.u.wireaddr);
}
ipv6_ok = (lfd != NULL);
@@ -1356,7 +1356,7 @@ setup_listeners(const tal_t *ctx,
tal_steal(listen_fds, lfd));
if (announce
&& public_address(daemon, &wa.u.wireaddr))
add_announcable(announcable,
add_announceable(announceable,
&wa.u.wireaddr);
} else if (!ipv6_ok) {
/* Both failed, return now, errstr set. */
@@ -1372,7 +1372,7 @@ setup_listeners(const tal_t *ctx,
return NULL;
tal_arr_expand(&listen_fds, tal_steal(listen_fds, lfd));
if (announce && public_address(daemon, &wa.u.wireaddr))
add_announcable(announcable, &wa.u.wireaddr);
add_announceable(announceable, &wa.u.wireaddr);
continue;
case ADDR_INTERNAL_FORPROXY:
break;
@@ -1425,10 +1425,10 @@ setup_listeners(const tal_t *ctx,
* there is also at least one address of
* different type.
*/
if (tal_count(*announcable) != 0) {
if (tal_count(*announceable) != 0) {
wireaddr_from_websocket(&addr.u.wireaddr,
daemon->websocket_port);
add_announcable(announcable,
add_announceable(announceable,
&addr.u.wireaddr);
} else {
status_unusual("Bound to websocket %s,"
@@ -1469,7 +1469,7 @@ setup_listeners(const tal_t *ctx,
if (!(proposed_listen_announce[i] & ADDR_ANNOUNCE)) {
continue;
};
add_announcable(announcable, toraddr);
add_announceable(announceable, toraddr);
}
/* Now we have bindings, set up any Tor static addresses: we will point
@@ -1516,7 +1516,7 @@ setup_listeners(const tal_t *ctx,
if (!(proposed_listen_announce[i] & ADDR_ANNOUNCE)) {
continue;
};
add_announcable(announcable, toraddr);
add_announceable(announceable, toraddr);
}
/*~ The spec used to ban more than one address of each type, but
@@ -1527,7 +1527,7 @@ setup_listeners(const tal_t *ctx,
*...
* - MUST place address descriptors in ascending order.
*/
asort(*announcable, tal_count(*announcable), wireaddr_cmp_type, NULL);
asort(*announceable, tal_count(*announceable), wireaddr_cmp_type, NULL);
*errstr = NULL;
return listen_fds;
@@ -1543,7 +1543,7 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
struct wireaddr_internal *binding;
struct wireaddr_internal *proposed_wireaddr;
enum addr_listen_announce *proposed_listen_announce;
struct wireaddr *announcable;
struct wireaddr *announceable;
char *tor_password;
bool dev_fast_gossip;
bool dev_disconnect;
@@ -1602,7 +1602,7 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
proposed_wireaddr,
proposed_listen_announce,
tor_password,
&announcable,
&announceable,
&errstr);
/* Free up old allocations */
@@ -1623,13 +1623,13 @@ static void connect_init(struct daemon *daemon, const u8 *msg)
daemon_conn_send(daemon->master,
take(towire_connectd_init_reply(NULL,
binding,
announcable,
announceable,
errstr)));
/*~ Who cares about a little once-off memory leak? Turns out we do!
* We have a memory leak checker which scans for allocated memory
* with no pointers to it (a tell-tale leak sign, though with tal it's
* not always a real problem), and this would (did!) trigger it. */
tal_free(announcable);
tal_free(announceable);
#if DEVELOPER
if (dev_disconnect)

View File

@@ -29,8 +29,8 @@ msgdata,connectd_init,dev_disconnect,bool,
msgtype,connectd_init_reply,2100
msgdata,connectd_init_reply,num_bindings,u16,
msgdata,connectd_init_reply,bindings,wireaddr_internal,num_bindings
msgdata,connectd_init_reply,num_announcable,u16,
msgdata,connectd_init_reply,announcable,wireaddr,num_announcable
msgdata,connectd_init_reply,num_announceable,u16,
msgdata,connectd_init_reply,announceable,wireaddr,num_announceable
msgdata,connectd_init_reply,failmsg,?wirestring,
# Activate the connect daemon, so others can connect.
1 #include <bitcoin/block.h>
29 msgdata,connectd_init_reply,bindings,wireaddr_internal,num_bindings
30 msgdata,connectd_init_reply,num_announcable,u16, msgdata,connectd_init_reply,num_announceable,u16,
31 msgdata,connectd_init_reply,announcable,wireaddr,num_announcable msgdata,connectd_init_reply,announceable,wireaddr,num_announceable
32 msgdata,connectd_init_reply,failmsg,?wirestring,
33 # Activate the connect daemon, so others can connect.
34 msgtype,connectd_activate,2025
35 # Do we listen?
36 msgdata,connectd_activate,listen,bool,

View File

@@ -38,8 +38,8 @@ static u8 *create_node_announcement(const tal_t *ctx, struct daemon *daemon,
if (!sig)
sig = talz(tmpctx, secp256k1_ecdsa_signature);
for (i = 0; i < tal_count(daemon->announcable); i++)
towire_wireaddr(&addresses, &daemon->announcable[i]);
for (i = 0; i < tal_count(daemon->announceable); i++)
towire_wireaddr(&addresses, &daemon->announceable[i]);
na_tlv = tlv_node_ann_tlvs_new(tmpctx);
na_tlv->option_will_fund = cast_const(struct lease_rates *, rates);

View File

@@ -672,7 +672,7 @@ static void gossip_init(struct daemon *daemon, const u8 *msg)
&daemon->id,
daemon->rgb,
daemon->alias,
&daemon->announcable,
&daemon->announceable,
&dev_gossip_time,
&dev_fast_gossip,
&dev_fast_gossip_prune)) {

View File

@@ -45,7 +45,7 @@ struct daemon {
u8 rgb[3];
/* What addresses we can actually announce. */
struct wireaddr *announcable;
struct wireaddr *announceable;
/* Timer until we can send an updated node_announcement */
struct oneshot *node_announce_timer;

View File

@@ -11,8 +11,8 @@ msgdata,gossipd_init,our_features,feature_set,
msgdata,gossipd_init,id,node_id,
msgdata,gossipd_init,rgb,u8,3
msgdata,gossipd_init,alias,u8,32
msgdata,gossipd_init,num_announcable,u16,
msgdata,gossipd_init,announcable,wireaddr,num_announcable
msgdata,gossipd_init,num_announceable,u16,
msgdata,gossipd_init,announceable,wireaddr,num_announceable
msgdata,gossipd_init,dev_gossip_time,?u32,
msgdata,gossipd_init,dev_fast_gossip,bool,
msgdata,gossipd_init,dev_fast_gossip_prune,bool,
1 #include <common/cryptomsg.h>
11 msgdata,gossipd_init,rgb,u8,3
12 msgdata,gossipd_init,alias,u8,32
13 msgdata,gossipd_init,num_announcable,u16, msgdata,gossipd_init,num_announceable,u16,
14 msgdata,gossipd_init,announcable,wireaddr,num_announcable msgdata,gossipd_init,announceable,wireaddr,num_announceable
15 msgdata,gossipd_init,dev_gossip_time,?u32,
16 msgdata,gossipd_init,dev_fast_gossip,bool,
17 msgdata,gossipd_init,dev_fast_gossip_prune,bool,
18 msgtype,gossipd_init_reply,3100

View File

@@ -469,7 +469,7 @@ static void connect_init_done(struct subd *connectd,
log_debug(connectd->log, "connectd_init_done");
if (!fromwire_connectd_init_reply(ld, reply,
&ld->binding,
&ld->announcable,
&ld->announceable,
&errmsg))
fatal("Bad connectd_init_reply: %s",
tal_hex(reply, reply));

View File

@@ -258,7 +258,7 @@ void gossip_init(struct lightningd *ld, int connectd_fd)
&ld->id,
ld->rgb,
ld->alias,
ld->announcable,
ld->announceable,
IFDEV(ld->dev_gossip_time ? &ld->dev_gossip_time: NULL, NULL),
IFDEV(ld->dev_fast_gossip, false),
IFDEV(ld->dev_fast_gossip_prune, false));

View File

@@ -144,9 +144,9 @@ struct lightningd {
/* Setup: And the bitset for each, whether to listen, announce or both */
enum addr_listen_announce *proposed_listen_announce;
/* Actual bindings and announcables from gossipd */
/* Actual bindings and announceables from gossipd */
struct wireaddr_internal *binding;
struct wireaddr *announcable;
struct wireaddr *announceable;
/* Bearer of all my secrets. */
int hsm_fd;

View File

@@ -304,7 +304,7 @@ static char *opt_add_announce_addr(const char *arg, struct lightningd *ld)
/* Can't announce anything that's not a normal wireaddr. */
if (ld->proposed_wireaddr[n].itype != ADDR_INTERNAL_WIREADDR)
return tal_fmt(NULL, "address '%s' is not announcable",
return tal_fmt(NULL, "address '%s' is not announceable",
arg);
return NULL;

View File

@@ -1723,8 +1723,8 @@ static struct command_result *json_getinfo(struct command *cmd,
if (cmd->ld->listen) {
/* These are the addresses we're announcing */
json_array_start(response, "address");
for (size_t i = 0; i < tal_count(cmd->ld->announcable); i++)
json_add_address(response, NULL, cmd->ld->announcable+i);
for (size_t i = 0; i < tal_count(cmd->ld->announceable); i++)
json_add_address(response, NULL, cmd->ld->announceable+i);
json_array_end(response);
/* This is what we're actually bound to. */

View File

@@ -1155,7 +1155,7 @@ def test_funding_reorg_remote_lags(node_factory, bitcoind):
# Reorg changes short_channel_id 103x1x0 to 104x1x0, l1 sees it, restarts channeld
bitcoind.simple_reorg(103, 1) # heights 103 - 108
# But now it's height 104, we need another block to make it announcable.
# But now it's height 104, we need another block to make it announceable.
bitcoind.generate_block(1)
l1.daemon.wait_for_log(r'Peer transient failure .* short_channel_id changed to 104x1x0 \(was 103x1x0\)')