invoice: include invoice label to wait subsystem when it's paid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-22 17:16:18 +09:30
parent 6782c2fef5
commit bbf4f312a4
5 changed files with 11 additions and 9 deletions

View File

@@ -315,7 +315,8 @@ invoice_payment_hooks_done(struct invoice_payment_hook_payload *payload STEALS)
}
/* Paid or expired in the meantime. */
if (!invoices_resolve(ld->wallet->invoices, inv_dbid, payload->msat)) {
if (!invoices_resolve(ld->wallet->invoices, inv_dbid, payload->msat,
payload->label)) {
htlc_set_fail(payload->set, take(failmsg_incorrect_or_unknown(
NULL, ld, payload->set->htlcs[0])));
return;

View File

@@ -414,7 +414,8 @@ struct db_stmt *invoices_next(struct invoices *invoices UNNEEDED,
/* Generated stub for invoices_resolve */
bool invoices_resolve(struct invoices *invoices UNNEEDED,
u64 inv_dbid UNNEEDED,
struct amount_msat received UNNEEDED)
struct amount_msat received UNNEEDED,
const struct json_escape *label UNNEEDED)
{ fprintf(stderr, "invoices_resolve called!\n"); abort(); }
/* Generated stub for invoices_waitany */
void invoices_waitany(const tal_t *ctx UNNEEDED,