@@ -38,6 +38,8 @@ struct xpay {
38
38
bool take_over_pay ;
39
39
/* Are we to wait for all parts to complete before returning? */
40
40
bool slow_mode ;
41
+ /* Suppress calls to askrene-age */
42
+ bool dev_no_age ;
41
43
};
42
44
43
45
static struct xpay * xpay_of (struct plugin * plugin )
@@ -2098,6 +2100,10 @@ static struct command_result *age_layer(struct command *timer_cmd, void *unused)
2098
2100
2099
2101
static void start_aging_timer (struct plugin * plugin )
2100
2102
{
2103
+ struct xpay * xpay = xpay_of (plugin );
2104
+
2105
+ if (xpay -> dev_no_age )
2106
+ return ;
2101
2107
notleak (global_timer (plugin , time_from_sec (60 ), age_layer , NULL ));
2102
2108
}
2103
2109
@@ -2422,6 +2428,7 @@ int main(int argc, char *argv[])
2422
2428
xpay = tal (NULL , struct xpay );
2423
2429
xpay -> take_over_pay = false;
2424
2430
xpay -> slow_mode = false;
2431
+ xpay -> dev_no_age = false;
2425
2432
plugin_main (argv , init , take (xpay ),
2426
2433
PLUGIN_RESTARTABLE , true, NULL ,
2427
2434
commands , ARRAY_SIZE (commands ),
@@ -2434,5 +2441,8 @@ int main(int argc, char *argv[])
2434
2441
plugin_option_dynamic ("xpay-slow-mode" , "bool" ,
2435
2442
"Wait until all parts have completed before returning success or failure" ,
2436
2443
bool_option , bool_jsonfmt , & xpay -> slow_mode ),
2444
+ plugin_option_dev ("dev-xpay-no-age" , "flag" ,
2445
+ "Don't call askrene-age" ,
2446
+ flag_option , flag_jsonfmt , & xpay -> dev_no_age ),
2437
2447
NULL );
2438
2448
}
0 commit comments