libplugin: Add callbacks for successful and failed payments

We're about to suspend duplicate calls to `pay` and this will help us
notify them if the original payment completes.
This commit is contained in:
Christian Decker
2021-10-04 21:13:11 +02:00
committed by Rusty Russell
parent ce3d3d8e54
commit 99f6faaabb
3 changed files with 28 additions and 0 deletions

View File

@@ -298,6 +298,11 @@ struct payment {
/* A human readable error message that is used as a top-level
* explanation if a payment is aborted. */
char *aborterror;
/* Callback to be called when the entire payment process
* completes successfully. */
void (*on_payment_success)(struct payment *p);
void (*on_payment_failure)(struct payment *p);
};
struct payment_modifier {