cleanup: rename use_proxy_always to always_use_proxy to match cfg

This renames all occurences of use_proxy_always to always_use_proxy
to keep it inline with config values. This was a bit confusing.

Only significant change is that the payload in the plugins init
requests also contained the old name. No plugin currently seems to make
use of this variable yet. The old name 'use_proxy_always' is added when
deprecated APIs is enabled.

Changelog-Deprecated: Plugins: Renames plugin init 'use_proxy_always' to 'always_use_proxy'
This commit is contained in:
Michael Schmoock
2021-08-18 12:52:21 +02:00
committed by Rusty Russell
parent 0550ffa9db
commit 24ea498350
7 changed files with 19 additions and 16 deletions

View File

@@ -165,7 +165,7 @@ static struct command_result *json_connect(struct command *cmd,
}
addr = tal(cmd, struct wireaddr_internal);
if (!parse_wireaddr_internal(name, addr, *port, false,
!cmd->ld->use_proxy_always
!cmd->ld->always_use_proxy
&& !cmd->ld->pure_tor_setup,
true, deprecated_apis,
&err_msg)) {
@@ -390,7 +390,7 @@ int connectd_init(struct lightningd *ld)
&ld->id,
wireaddrs,
listen_announce,
ld->proxyaddr, ld->use_proxy_always || ld->pure_tor_setup,
ld->proxyaddr, ld->always_use_proxy || ld->pure_tor_setup,
IFDEV(ld->dev_allow_localhost, false), ld->config.use_dns,
ld->tor_service_password ? ld->tor_service_password : "",
ld->config.use_v3_autotor,