invoice: don't allow zero-value invoices.

You can't pay them anyway, and at least one person used 0 instead of "any".

Closes: #3808
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `invoice` no longer accepts zero amounts (did you mean "any"?)
This commit is contained in:
Rusty Russell
2020-08-25 10:35:46 +09:30
parent 2e51f23a95
commit ef3fbab551
4 changed files with 32 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ invoice, if any exists\.
The \fImsatoshi\fR parameter can be the string "any", which creates an
invoice that can be paid with any amount\. Otherwise it is in
invoice that can be paid with any amount\. Otherwise it is a positive value in
millisatoshi precision; it can be a whole number, or a whole number
ending in \fImsat\fR or \fIsat\fR, or a number with three decimal places ending
in \fIsat\fR, or a number with 1 to 11 decimal places ending in \fIbtc\fR\.

View File

@@ -17,7 +17,7 @@ lightning daemon can use to pay this invoice. This token includes a
invoice, if any exists.
The *msatoshi* parameter can be the string "any", which creates an
invoice that can be paid with any amount. Otherwise it is in
invoice that can be paid with any amount. Otherwise it is a positive value in
millisatoshi precision; it can be a whole number, or a whole number
ending in *msat* or *sat*, or a number with three decimal places ending
in *sat*, or a number with 1 to 11 decimal places ending in *btc*.