mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
cli: Add --no-reconnect cli flag
Especially when testing we might want to disable the automatic reconnection logic in order not to masquerade bugs that disappear when reconnecting. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
243fc2c05a
commit
48796f4f39
@@ -64,6 +64,9 @@ struct config {
|
||||
|
||||
/* IPv4 or IPv6 address to announce to the network */
|
||||
struct ipaddr ipaddr;
|
||||
|
||||
/* Disable automatic reconnects */
|
||||
bool no_reconnect;
|
||||
};
|
||||
|
||||
struct lightningd {
|
||||
|
||||
@@ -224,6 +224,8 @@ static void config_register_opts(struct lightningd *ld)
|
||||
opt_register_arg("--fee-per-satoshi", opt_set_s32, opt_show_s32,
|
||||
&ld->config.fee_per_satoshi,
|
||||
"Microsatoshi fee for every satoshi in HTLC");
|
||||
opt_register_noarg("--no-reconnect", opt_set_bool,
|
||||
&ld->config.no_reconnect, "Disable automatic reconnect attempts");
|
||||
|
||||
opt_register_arg("--ipaddr", opt_set_ipaddr, NULL,
|
||||
&ld->config.ipaddr,
|
||||
@@ -298,6 +300,9 @@ static const struct config testnet_config = {
|
||||
|
||||
/* Do not advertise any IP */
|
||||
.ipaddr.type = 0,
|
||||
|
||||
/* Automatically reconnect */
|
||||
.no_reconnect = false,
|
||||
};
|
||||
|
||||
/* aka. "Dude, where's my coins?" */
|
||||
@@ -356,6 +361,9 @@ static const struct config mainnet_config = {
|
||||
|
||||
/* Do not advertise any IP */
|
||||
.ipaddr.type = 0,
|
||||
|
||||
/* Automatically reconnect */
|
||||
.no_reconnect = false,
|
||||
};
|
||||
|
||||
static void check_config(struct lightningd *ld)
|
||||
|
||||
Reference in New Issue
Block a user