Added wallet related error codes

New codes: FUND_MAX_EXCEEDED, FUND_CANNOT_AFFORD, FUND_DUST_LIMIT_UNMET.

The error message "Cannot afford fee" was not exactly correct because
it would also occur if the amount requested could not be afforded.  So
I changed it to the more generic "Cannot afford transaction".

Other things:

* Fixed off-by-one satoshi in fundchannel manpage.
* Changed 'arror' to 'error' because we are not pirates.
This commit is contained in:
Mark Beckwith
2018-06-15 11:45:06 -05:00
committed by Christian Decker
parent 2d95ed738e
commit 8f0ef1636f
6 changed files with 40 additions and 25 deletions

View File

@@ -29,6 +29,11 @@
#define PAY_UNSPECIFIED_ERROR 209
#define PAY_STOPPED_RETRYING 210
/* `fundchannel` or `withdraw` errors */
#define FUND_MAX_EXCEEDED 300
#define FUND_CANNOT_AFFORD 301
#define FUND_DUST_LIMIT_UNMET 302
/* Errors from `invoice` command */
#define INVOICE_LABEL_ALREADY_EXISTS 900
#define INVOICE_PREIMAGE_ALREADY_EXISTS 901