diff --git a/plugins/renepay/Makefile b/plugins/renepay/Makefile index 9acf4b20defb..501db8a51c57 100644 --- a/plugins/renepay/Makefile +++ b/plugins/renepay/Makefile @@ -24,6 +24,7 @@ PLUGIN_RENEPAY_HDRS := \ plugins/renepay/payment.h \ plugins/renepay/payment_info.h \ plugins/renepay/chan_extra.h \ + plugins/renepay/renepayconfig.h \ plugins/renepay/route.h \ plugins/renepay/routebuilder.h \ plugins/renepay/routetracker.h \ diff --git a/plugins/renepay/mods.c b/plugins/renepay/mods.c index 416ccb66f1ac..9000e259754d 100644 --- a/plugins/renepay/mods.c +++ b/plugins/renepay/mods.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -19,8 +20,6 @@ #define OP_CALL (void *)1 #define OP_IF (void *)2 -#define COLLECTOR_TIME_WINDOW_MSEC 50 - void *payment_virtual_program[]; /* Advance the payment virtual machine */ diff --git a/plugins/renepay/payplugin.h b/plugins/renepay/payplugin.h index 2b9fb2a8127a..e79585fda07f 100644 --- a/plugins/renepay/payplugin.h +++ b/plugins/renepay/payplugin.h @@ -6,6 +6,7 @@ #include #include #include +#include #include // TODO(eduardo): renepaystatus should be similar to paystatus @@ -20,15 +21,6 @@ // TODO(eduardo): check if paynotes are meaningful // TODO(eduardo): remove assertions, introduce LOG_BROKEN messages -#define MAX_NUM_ATTEMPTS 10 - -/* Time lapse used to wait for failed sendpays before try_paying. */ -#define TIMER_COLLECT_FAILURES_MSEC 250 - -/* Knowledge is proportionally decreased with time up to TIMER_FORGET_SEC when - * we forget everything. */ -#define TIMER_FORGET_SEC 3600 - // TODO(eduardo): Test ideas // - make a payment to a node that is hidden behind private channels, check that // private channels are removed from the gossmap and chan_extra_map diff --git a/plugins/renepay/renepayconfig.h b/plugins/renepay/renepayconfig.h new file mode 100644 index 000000000000..e4d87058a6c3 --- /dev/null +++ b/plugins/renepay/renepayconfig.h @@ -0,0 +1,14 @@ +#ifndef LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H +#define LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H +#include "config.h" + +#define MAX_NUM_ATTEMPTS 10 + +/* Knowledge is proportionally decreased with time up to TIMER_FORGET_SEC when + * we forget everything. */ +#define TIMER_FORGET_SEC 3600 + +/* Time lapse used to wait for failed sendpays. */ +#define COLLECTOR_TIME_WINDOW_MSEC 50 + +#endif /* LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H */