Browse Source

wallet: clarify error 302.

"Dust limit unmet" seems undescriptive to me.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
7f508cca5f
  1. 5
      common/wallet_tx.c
  2. 6
      doc/lightning-fundchannel.7
  3. 2
      doc/lightning-fundchannel.7.txt
  4. 2
      lightningd/jsonrpc_errors.h

5
common/wallet_tx.c

@ -20,8 +20,9 @@ static bool check_amount(const struct wallet_tx *tx)
return false;
}
if (tx->amount < 546) {
command_fail(tx->cmd, FUND_DUST_LIMIT_UNMET,
"Dust limit unmet");
command_fail(tx->cmd, FUND_OUTPUT_IS_DUST,
"Output %"PRIu64" satoshis would be dust",
tx->amount);
return false;
}
return true;

6
doc/lightning-fundchannel.7

@ -2,12 +2,12 @@
.\" Title: lightning-fundchannel
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 06/15/2018
.\" Date: 06/17/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/15/2018" "\ \&" "\ \&"
.TH "LIGHTNING\-FUNDCHANN" "7" "06/17/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -86,7 +86,7 @@ The following error codes may occur:
.sp -1
.IP \(bu 2.3
.\}
302\&. The dust limit is not met\&.
302\&. The output amount is too small, and would be considered dust\&.
.RE
.sp
Failure may also occur if \fBlightningd\fR and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc\&.)\&.

2
doc/lightning-fundchannel.7.txt

@ -39,7 +39,7 @@ The following error codes may occur:
* 300. The maximum allowed funding amount is exceeded.
* 301. There are not enough funds in the internal wallet (including fees) to
create the transaction.
* 302. The dust limit is not met.
* 302. The output amount is too small, and would be considered dust.
Failure may also occur if *lightningd* and the peer cannot agree on channel
parameters (funding limits, channel reserves, fees, etc.).

2
lightningd/jsonrpc_errors.h

@ -32,7 +32,7 @@
/* `fundchannel` or `withdraw` errors */
#define FUND_MAX_EXCEEDED 300
#define FUND_CANNOT_AFFORD 301
#define FUND_DUST_LIMIT_UNMET 302
#define FUND_OUTPUT_IS_DUST 302
/* Errors from `invoice` command */
#define INVOICE_LABEL_ALREADY_EXISTS 900

Loading…
Cancel
Save