Skip to content

Commit f195bb8

Browse files
committed
xpay: age askrene entries older than 1 week
We have set an exponential decay time for liquidity bounds with a lifetime of 1 day, it halves every 16 hours. This parameter can be tuned. But I think throwing away entries after 1 hour is too aggresive. Better to remove them after 1 week. In that time it will be halved 10 times. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
1 parent 03062fe commit f195bb8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎plugins/xpay/xpay.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131

3232
#define PREIMAGE_TLV_TYPE 5482373484
3333

34+
/* Entries older than 1 week are thrown away. */
35+
#define XPAY_AGE_TIME_SECS 604800
36+
3437
/* For the whole plugin */
3538
struct xpay {
3639
/* This is me. */
@@ -2966,7 +2969,7 @@ static struct command_result *age_layer(struct command *cmd, struct payment *pay
29662969
plugin_broken_cb,
29672970
payment);
29682971
json_add_string(req->js, "layer", "xpay");
2969-
json_add_u64(req->js, "cutoff", clock_time().ts.tv_sec - 3600);
2972+
json_add_u64(req->js, "cutoff", clock_time().ts.tv_sec - XPAY_AGE_TIME_SECS);
29702973
return send_outreq(req);
29712974
}
29722975

0 commit comments

Comments
 (0)