jsonrpc: Arm the minconf=1 parameter and deal with the fallout

We want to disallow using unconfirmed outputs by default, so making the
default 1 confirmation seems a good idea. This also matches `bitcoind`s
minimum confirmation requirement.

Arming however breaks some of our tests, so I used `minconf=0` for the
breaking tests and added a new test specifically for the `minconf` parameter
for `fundchannel`.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-02-21 21:19:14 +01:00
committed by Rusty Russell
parent 683b601dc7
commit 72f1c78a1e
5 changed files with 31 additions and 6 deletions

View File

@@ -845,7 +845,7 @@ static struct command_result *json_fund_channel(struct command *cmd,
p_req("satoshi", param_wtx, &fc->wtx),
p_opt("feerate", param_feerate, &feerate_per_kw),
p_opt_def("announce", param_bool, &announce_channel, true),
p_opt_def("minconf", param_number, &minconf, 0),
p_opt_def("minconf", param_number, &minconf, 1),
NULL))
return command_param_failed();