closing: add option to set closing range.

This affects the range we offer even without quick-close, but it's
more critical for quick-close.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSONRPC: `close` now takes a `feerange` parameter to set min/max fee rates for mutual close.
This commit is contained in:
Rusty Russell
2021-09-08 14:11:46 +09:30
parent e12f9f0872
commit 6ee8c40b29
14 changed files with 136 additions and 14 deletions

View File

@@ -622,6 +622,7 @@ static void calc_fee_bounds(size_t expected_weight,
/* option_anchor_outputs sets commitment_fee to max, so this
* doesn't do anything */
if (amount_sat_greater(*maxfee, commitment_fee)) {
/* FIXME: would be nice to notify close cmd here! */
status_unusual("Maximum feerate %u would give fee %s:"
" we must limit it to the final commitment fee %s",
*max_feerate,