Skip to content

Commit 2664fae

Browse files
Lagrang3endothermicdev
authored andcommitted
renepay: put global variables into renepayconfig.h
Signed-off-by: Lagrang3 <[email protected]>
1 parent 6b91497 commit 2664fae

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

plugins/renepay/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ PLUGIN_RENEPAY_HDRS := \
2424
plugins/renepay/payment.h \
2525
plugins/renepay/payment_info.h \
2626
plugins/renepay/chan_extra.h \
27+
plugins/renepay/renepayconfig.h \
2728
plugins/renepay/route.h \
2829
plugins/renepay/routebuilder.h \
2930
plugins/renepay/routetracker.h \

plugins/renepay/mods.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <plugins/renepay/mcf.h>
99
#include <plugins/renepay/mods.h>
1010
#include <plugins/renepay/payplugin.h>
11+
#include <plugins/renepay/renepayconfig.h>
1112
#include <plugins/renepay/route.h>
1213
#include <plugins/renepay/routebuilder.h>
1314
#include <plugins/renepay/routetracker.h>
@@ -19,8 +20,6 @@
1920
#define OP_CALL (void *)1
2021
#define OP_IF (void *)2
2122

22-
#define COLLECTOR_TIME_WINDOW_MSEC 50
23-
2423
void *payment_virtual_program[];
2524

2625
/* Advance the payment virtual machine */

plugins/renepay/payplugin.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <plugins/libplugin.h>
77
#include <plugins/renepay/flow.h>
88
#include <plugins/renepay/payment.h>
9+
#include <plugins/renepay/renepayconfig.h>
910
#include <plugins/renepay/uncertainty.h>
1011

1112
// TODO(eduardo): renepaystatus should be similar to paystatus
@@ -20,15 +21,6 @@
2021
// TODO(eduardo): check if paynotes are meaningful
2122
// TODO(eduardo): remove assertions, introduce LOG_BROKEN messages
2223

23-
#define MAX_NUM_ATTEMPTS 10
24-
25-
/* Time lapse used to wait for failed sendpays before try_paying. */
26-
#define TIMER_COLLECT_FAILURES_MSEC 250
27-
28-
/* Knowledge is proportionally decreased with time up to TIMER_FORGET_SEC when
29-
* we forget everything. */
30-
#define TIMER_FORGET_SEC 3600
31-
3224
// TODO(eduardo): Test ideas
3325
// - make a payment to a node that is hidden behind private channels, check that
3426
// private channels are removed from the gossmap and chan_extra_map

plugins/renepay/renepayconfig.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#ifndef LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H
2+
#define LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H
3+
#include "config.h"
4+
5+
#define MAX_NUM_ATTEMPTS 10
6+
7+
/* Knowledge is proportionally decreased with time up to TIMER_FORGET_SEC when
8+
* we forget everything. */
9+
#define TIMER_FORGET_SEC 3600
10+
11+
/* Time lapse used to wait for failed sendpays. */
12+
#define COLLECTOR_TIME_WINDOW_MSEC 50
13+
14+
#endif /* LIGHTNING_PLUGINS_RENEPAY_RENEPAYCONFIG_H */

0 commit comments

Comments
 (0)