plugins/fetchinvoice: handle sendinvoice timeout, error or payment.

If they pay the invoice, they don't bother replying; that's just for
errors.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-01-08 05:09:47 +10:30
parent dc2ba6f9d9
commit 075c25fc08
3 changed files with 143 additions and 14 deletions

View File

@@ -83,6 +83,7 @@ static const errcode_t OFFER_ALREADY_DISABLED = 1001;
static const errcode_t OFFER_EXPIRED = 1002;
static const errcode_t OFFER_ROUTE_NOT_FOUND = 1003;
static const errcode_t OFFER_BAD_INVREQ_REPLY = 1004;
static const errcode_t OFFER_TIMEOUT = 1005;
/* Errors from wait* commands */
static const errcode_t WAIT_TIMEOUT = 2000;