Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Commit 7f508cc

Browse files
rustyrussellcdecker
authored andcommitted
wallet: clarify error 302.
"Dust limit unmet" seems undescriptive to me. Signed-off-by: Rusty Russell <[email protected]>
1 parent f4eda74 commit 7f508cc

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

common/wallet_tx.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ static bool check_amount(const struct wallet_tx *tx)
2020
return false;
2121
}
2222
if (tx->amount < 546) {
23-
command_fail(tx->cmd, FUND_DUST_LIMIT_UNMET,
24-
"Dust limit unmet");
23+
command_fail(tx->cmd, FUND_OUTPUT_IS_DUST,
24+
"Output %"PRIu64" satoshis would be dust",
25+
tx->amount);
2526
return false;
2627
}
2728
return true;

doc/lightning-fundchannel.7

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: lightning-fundchannel
33
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
44
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5-
.\" Date: 06/15/2018
5+
.\" Date: 06/17/2018
66
.\" Manual: \ \&
77
.\" Source: \ \&
88
.\" Language: English
99
.\"
10-
.TH "LIGHTNING\-FUNDCHANN" "7" "06/15/2018" "\ \&" "\ \&"
10+
.TH "LIGHTNING\-FUNDCHANN" "7" "06/17/2018" "\ \&" "\ \&"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------
@@ -86,7 +86,7 @@ The following error codes may occur:
8686
.sp -1
8787
.IP \(bu 2.3
8888
.\}
89-
302\&. The dust limit is not met\&.
89+
302\&. The output amount is too small, and would be considered dust\&.
9090
.RE
9191
.sp
9292
Failure may also occur if \fBlightningd\fR and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc\&.)\&.

doc/lightning-fundchannel.7.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following error codes may occur:
3939
* 300. The maximum allowed funding amount is exceeded.
4040
* 301. There are not enough funds in the internal wallet (including fees) to
4141
create the transaction.
42-
* 302. The dust limit is not met.
42+
* 302. The output amount is too small, and would be considered dust.
4343

4444
Failure may also occur if *lightningd* and the peer cannot agree on channel
4545
parameters (funding limits, channel reserves, fees, etc.).

lightningd/jsonrpc_errors.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/* `fundchannel` or `withdraw` errors */
3333
#define FUND_MAX_EXCEEDED 300
3434
#define FUND_CANNOT_AFFORD 301
35-
#define FUND_DUST_LIMIT_UNMET 302
35+
#define FUND_OUTPUT_IS_DUST 302
3636

3737
/* Errors from `invoice` command */
3838
#define INVOICE_LABEL_ALREADY_EXISTS 900

0 commit comments

Comments
 (0)