diff --git a/common/wallet_tx.c b/common/wallet_tx.c index 89ff3aa2c..7e51b5dc8 100644 --- a/common/wallet_tx.c +++ b/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; diff --git a/doc/lightning-fundchannel.7 b/doc/lightning-fundchannel.7 index cdb879cc2..13addecba 100644 --- a/doc/lightning-fundchannel.7 +++ b/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 -.\" 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\&.)\&. diff --git a/doc/lightning-fundchannel.7.txt b/doc/lightning-fundchannel.7.txt index a337e72a5..ff3a5686b 100644 --- a/doc/lightning-fundchannel.7.txt +++ b/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.). diff --git a/lightningd/jsonrpc_errors.h b/lightningd/jsonrpc_errors.h index c7cc4ab20..bdacc2153 100644 --- a/lightningd/jsonrpc_errors.h +++ b/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