mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
df: add new config option for v2 opens --require_confirmed_inputs
If set, require peers to only provide confirmed inputs for any v2 open (both in accepter + opener role)
This commit is contained in:
parent
abb50c4627
commit
442b479d2c
4 changed files with 18 additions and 3 deletions
|
@ -104,6 +104,7 @@ On success, an object is returned, containing:
|
|||
- **tor-service-password** (string, optional): `tor-service-password` field from config or cmdline, if any
|
||||
- **dev-allowdustreserve** (boolean, optional): Whether we allow setting dust reserves
|
||||
- **announce-addr-dns** (boolean, optional): Whether we put DNS entries into node\_announcement *(added v22.11.1)*
|
||||
- **require-confirmed-inputs** (boolean, optional): Request peers to only send confirmed inputs (dual-fund only)
|
||||
|
||||
[comment]: # (GENERATE-FROM-SCHEMA-END)
|
||||
|
||||
|
@ -222,4 +223,4 @@ RESOURCES
|
|||
|
||||
Main web site: <https://github.com/ElementsProject/lightning>
|
||||
|
||||
[comment]: # ( SHA256STAMP:11ff355ba2ee2d5c636cf140f54349a536f3d33554c3ec33fe2a096c0b6fb29c)
|
||||
[comment]: # ( SHA256STAMP:581225b26efd84bfa99dc98e7a91e6fae11ef0b11939031d3da07f751f6d8f87)
|
||||
|
|
|
@ -308,8 +308,12 @@
|
|||
},
|
||||
"announce-addr-dns": {
|
||||
"type": "boolean",
|
||||
"description": "Whether we put DNS entries into node_announcement",
|
||||
"added": "v22.11.1"
|
||||
"added": "v22.11.1",
|
||||
"description": "Whether we put DNS entries into node_announcement"
|
||||
},
|
||||
"require-confirmed-inputs": {
|
||||
"type": "boolean",
|
||||
"description": "Request peers to only send confirmed inputs (dual-fund only)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,9 @@ struct config {
|
|||
* slight spec incompatibility, but implementations do this
|
||||
* already. */
|
||||
bool allowdustreserve;
|
||||
|
||||
/* Require peer to send confirmed inputs */
|
||||
bool require_confirmed_inputs;
|
||||
};
|
||||
|
||||
typedef STRMAP(const char *) alt_subdaemon_map;
|
||||
|
|
|
@ -858,6 +858,8 @@ static const struct config testnet_config = {
|
|||
.exp_offers = IFEXPERIMENTAL(true, false),
|
||||
|
||||
.allowdustreserve = false,
|
||||
|
||||
.require_confirmed_inputs = false,
|
||||
};
|
||||
|
||||
/* aka. "Dude, where's my coins?" */
|
||||
|
@ -927,6 +929,8 @@ static const struct config mainnet_config = {
|
|||
.exp_offers = IFEXPERIMENTAL(true, false),
|
||||
|
||||
.allowdustreserve = false,
|
||||
|
||||
.require_confirmed_inputs = false,
|
||||
};
|
||||
|
||||
static void check_config(struct lightningd *ld)
|
||||
|
@ -1180,6 +1184,9 @@ static void register_opts(struct lightningd *ld)
|
|||
opt_register_arg("--funding-confirms", opt_set_u32, opt_show_u32,
|
||||
&ld->config.anchor_confirms,
|
||||
"Confirmations required for funding transaction");
|
||||
opt_register_arg("--require-confirmed-inputs", opt_set_bool_arg, opt_show_bool,
|
||||
&ld->config.require_confirmed_inputs,
|
||||
"Confirmations required for inputs to funding transaction (v2 opens only)");
|
||||
opt_register_arg("--cltv-delta", opt_set_u32, opt_show_u32,
|
||||
&ld->config.cltv_expiry_delta,
|
||||
"Number of blocks for cltv_expiry_delta");
|
||||
|
|
Loading…
Add table
Reference in a new issue