sendpay: optional argument to link local offer.

This is for offers which have `send_invoice`: we need to associate the
payment with the original offer, in (the usual) case where it is a single
use offer.  We mark it used when it's paid, to avoid a race.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-14 11:50:44 +10:30
committed by Christian Decker
parent 963f6b5d67
commit 3f4683e3f8
5 changed files with 166 additions and 8 deletions

View File

@@ -41,6 +41,7 @@ static const errcode_t PAY_NO_SUCH_PAYMENT = 208;
static const errcode_t PAY_UNSPECIFIED_ERROR = 209;
static const errcode_t PAY_STOPPED_RETRYING = 210;
static const errcode_t PAY_STATUS_UNEXPECTED = 211;
static const errcode_t PAY_OFFER_INVALID = 212;
/* `fundchannel` or `withdraw` errors */
static const errcode_t FUND_MAX_EXCEEDED = 300;