Browse Source

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>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
48796f4f39
  1. 3
      lightningd/lightningd.h
  2. 8
      lightningd/options.c

3
lightningd/lightningd.h

@ -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 {

8
lightningd/options.c

@ -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)

Loading…
Cancel
Save