mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
options: fix ld proposed_wireaddr proposed_listen_announce get out of sync
Incase the error handling happening after the quted line is non-critical: ``` return tal_fmt(NULL, "Unable to parse address '%s': %s", arg, err_msg); ``` we should not expand the proposed_listen_announce array without adding a proposed_wireaddr. So we move the expand of proposed_listen_announce to the location where we also expand the proposed_wireaddr. Changelog-None
This commit is contained in:
parent
35c6f90666
commit
45f6bf6cf1
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,6 @@ static char *opt_add_addr_withtype(const char *arg,
|
|||
|
||||
assert(arg != NULL);
|
||||
|
||||
tal_arr_expand(&ld->proposed_listen_announce, ala);
|
||||
if (!parse_wireaddr_internal(arg, &wi,
|
||||
ld->portnum,
|
||||
wildcard_ok, !ld->always_use_proxy, false,
|
||||
|
@ -210,6 +209,8 @@ static char *opt_add_addr_withtype(const char *arg,
|
|||
ala & ADDR_ANNOUNCE ? "announce" : "listen",
|
||||
type_to_string(tmpctx, struct wireaddr_internal, &wi));
|
||||
}
|
||||
|
||||
tal_arr_expand(&ld->proposed_listen_announce, ala);
|
||||
tal_arr_expand(&ld->proposed_wireaddr, wi);
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue