paymod: Add a retry modifier that retries payments on failure

This is likely a bit of overkill for this type of functionality, but it is a
nice first use-case of how functionality can be compartmentalized into
modifiers. If makes swapping retry mechanisms in and out really simple.
This commit is contained in:
Christian Decker
2020-05-08 16:51:43 +02:00
parent aeb5cc0b7c
commit 5c32e33aab
3 changed files with 42 additions and 1 deletions

View File

@@ -145,6 +145,10 @@ struct dummy_data {
unsigned int *dummy_param;
};
struct retry_mod_data {
int retries;
};
/* List of globally available payment modifiers. */
extern struct payment_modifier dummy_pay_mod;
REGISTER_PAYMENT_MODIFIER_HEADER(retry, struct retry_mod_data);