lightningd: allow "NNblocks" and "minimum" as feerates.

And consolidate descriptions into lightning-feerates().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `close`, `fundchannel`, `fundpsbt`, `multifundchannel`, `multiwithdraw`, `txprepare`, `upgradewallet`, `withdraw` now allow "minimum" and NN"blocks" as `feerate` (`feerange` for `close`).
This commit is contained in:
Rusty Russell
2023-04-07 14:13:45 +09:30
parent 64b1ddd761
commit c46473e615
13 changed files with 69 additions and 81 deletions

View File

@@ -66,16 +66,7 @@ unless this flag is passed in. Defaults to false.
*feerange* is an optional array [ *min*, *max* ], indicating the
minimum and maximum feerates to offer: the peer will obey these if it
supports the quick-close protocol. *slow* and *unilateral\_close* are
the defaults.
Rates are one of the strings *urgent* (aim for next block), *normal*
(next 4 blocks or so) or *slow* (next 100 blocks or so) to use
lightningd's internal estimates, or one of the names from
lightning-feerates(7). Otherwise, they can be numbers with
an optional suffix: *perkw* means the number is interpreted as
satoshi-per-kilosipa (weight), and *perkb* means it is interpreted
bitcoind-style as satoshi-per-kilobyte. Omitting the suffix is
equivalent to *perkb*.
the defaults. See NOTES in lightning-feerates(7) for possible values.
Note that the maximum fee will be capped at the final commitment
transaction fee (unless the experimental anchor-outputs option is

View File

@@ -96,13 +96,20 @@ if feerate estimates for that kind of transaction are unavailable.
NOTES
-----
Many other commands have a *feerate* parameter, which can be the strings
*urgent*, *normal*, or *slow*.
These are mapped to the **feerates** outputs as:
Many other commands have a *feerate* parameter. This can be:
* *urgent* - equal to *unilateral\_close*
* *normal* - equal to *opening*
* *slow* - equal to *min\_acceptable*.
* One of the strings to use lightningd's internal estimates:
* *urgent* (aim for next block),
* *normal* (next 6 blocks or so)
* *slow* (next 100 blocks or so)
* *minimum* for the lowest value bitcoind will currently accept (added in v23.05)
* A number, with an optional suffix:
* *blocks* means aim for confirmation in that many blocks (added in v23.05)
* *perkw* means the number is interpreted as satoshi-per-kilosipa (weight)
* *perkb* means it is interpreted bitcoind-style as satoshi-per-kilobyte.
Omitting the suffix is equivalent to *perkb*.
TRIVIA
------

View File

@@ -35,16 +35,9 @@ decimal places ending in *btc*. The value cannot be less than the dust
limit, currently set to 546, nor more than 16777215 satoshi (unless large
channels were negotiated with the peer).
*feerate* is an optional feerate used for the opening transaction and as
initial feerate for commitment and HTLC transactions. It can be one of
the strings *urgent* (aim for next block), *normal* (next 4 blocks or
so) or *slow* (next 100 blocks or so) to use lightningd's internal
estimates: *normal* is the default.
Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.
*feerate* is an optional feerate used for the opening transaction and
as initial feerate for commitment and HTLC transactions (see NOTES in
lightning-feerates(7)). The default is *normal*.
*announce* is an optional flag that triggers whether to announce this
channel or not. Defaults to `true`. An unannounced channel is considered

View File

@@ -18,14 +18,8 @@ be a whole number, a whole number ending in *sat*, a whole number
ending in *000msat*, or a number with 1 to 8 decimal places ending in
*btc*.
*feerate* can be one of the feerates listed in lightning-feerates(7),
or one of the strings *urgent* (aim for next block), *normal* (next 4
blocks or so) or *slow* (next 100 blocks or so) to use lightningd's
internal estimates. It can also be a *feerate* is a number, with an
optional suffix: *perkw* means the number is interpreted as
satoshi-per-kilosipa (weight), and *perkb* means it is interpreted
bitcoind-style as satoshi-per-kilobyte. Omitting the suffix is
equivalent to *perkb*.
*feerate* is an optional feerate: see NOTES in lightning-feerates(7)
for possible values. The default is *normal*.
*startweight* is the weight of the transaction before *fundpsbt* has
added any inputs.

View File

@@ -65,17 +65,10 @@ Readiness is indicated by **listpeers** reporting a *state* of
There must be at least one entry in *destinations*;
it cannot be an empty array.
*feerate* is an optional feerate used for the opening transaction and, if
*commitment\_feerate* is not set, as the initial feerate for
commitment and HTLC transactions. It can be one of
the strings *urgent* (aim for next block), *normal* (next 4 blocks or
so) or *slow* (next 100 blocks or so) to use lightningd's internal
estimates: *normal* is the default.
Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.
*feerate* is an optional feerate used for the opening transaction, and
if *commitment\_feerate* is not set, as initial feerate for commitment
and HTLC transactions. See NOTES in lightning-feerates(7) for possible
values. The default is *normal*.
*minconf* specifies the minimum number of confirmations that used
outputs should have. Default is 1.

View File

@@ -21,15 +21,8 @@ a whole number ending in *sat*,
a whole number ending in *000msat*,
or a number with 1 to 8 decimal places ending in *btc*.
*feerate* is an optional feerate to use. It can be one of the strings
*urgent* (aim for next block), *normal* (next 4 blocks or so) or *slow*
(next 100 blocks or so) to use lightningd's internal estimates: *normal*
is the default.
Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.
*feerate* is an optional feerate: see NOTES in lightning-feerates(7)
for possible values. The default is *normal*.
*minconf* specifies the minimum number of confirmations that used
outputs should have. Default is 1.

View File

@@ -29,15 +29,8 @@ all available funds. Otherwise, it is in amount precision; it can be a whole
number, a whole number ending in *sat*, a whole number ending in *000msat*,
or a number with 1 to 8 decimal places ending in *btc*.
*feerate* is an optional feerate to use. It can be one of the strings
*urgent* (aim for next block), *normal* (next 4 blocks or so) or *slow*
(next 100 blocks or so) to use lightningd's internal estimates: *normal*
is the default.
Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.
*feerate* is an optional feerate to use: see NOTES in lightning-feerates(7)
for possible values. The default is *normal*.
*minconf* specifies the minimum number of confirmations that used
outputs should have. Default is 1.

View File

@@ -12,14 +12,8 @@ DESCRIPTION
`upgradewallet` is a convenience RPC which will spend all p2sh-wrapped
Segwit deposits in a wallet into a single Native Segwit P2WPKH address.
*feerate* can be one of the feerates listed in lightning-feerates(7),
or one of the strings *urgent* (aim for next block), *normal* (next 4
blocks or so) or *slow* (next 100 blocks or so) to use lightningd's
internal estimates. It can also be a *feerate* is a number, with an
optional suffix: *perkw* means the number is interpreted as
satoshi-per-kilosipa (weight), and *perkb* means it is interpreted
bitcoind-style as satoshi-per-kilobyte. Omitting the suffix is
equivalent to *perkb*.
*feerate* is an optional feerate: see NOTES in lightning-feerates(7)
for possible values. The default is *opening*.
*reservedok* tells the wallet to include all P2SH-wrapped inputs, including
reserved ones.

View File

@@ -21,15 +21,8 @@ satoshi precision; it can be a whole number, a whole number ending in
*sat*, a whole number ending in *000msat*, or a number with 1 to 8
decimal places ending in *btc*.
*feerate* is an optional feerate to use. It can be one of the strings
*urgent* (aim for next block), *normal* (next 4 blocks or so) or *slow*
(next 100 blocks or so) to use lightningd's internal estimates: *normal*
is the default.
Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.
*feerate* is an optional feerate: see NOTES in lightning-feerates(7)
for possible values. The default is *normal*.
*minconf* specifies the minimum number of confirmations that used
outputs should have. Default is 1.