@@ -38,6 +38,8 @@ struct xpay {
3838 bool take_over_pay ;
3939 /* Are we to wait for all parts to complete before returning? */
4040 bool slow_mode ;
41+ /* Suppress calls to askrene-age */
42+ bool dev_no_age ;
4143};
4244
4345static struct xpay * xpay_of (struct plugin * plugin )
@@ -2098,6 +2100,10 @@ static struct command_result *age_layer(struct command *timer_cmd, void *unused)
20982100
20992101static void start_aging_timer (struct plugin * plugin )
21002102{
2103+ struct xpay * xpay = xpay_of (plugin );
2104+
2105+ if (xpay -> dev_no_age )
2106+ return ;
21012107 notleak (global_timer (plugin , time_from_sec (60 ), age_layer , NULL ));
21022108}
21032109
@@ -2422,6 +2428,7 @@ int main(int argc, char *argv[])
24222428 xpay = tal (NULL , struct xpay );
24232429 xpay -> take_over_pay = false;
24242430 xpay -> slow_mode = false;
2431+ xpay -> dev_no_age = false;
24252432 plugin_main (argv , init , take (xpay ),
24262433 PLUGIN_RESTARTABLE , true, NULL ,
24272434 commands , ARRAY_SIZE (commands ),
@@ -2434,5 +2441,8 @@ int main(int argc, char *argv[])
24342441 plugin_option_dynamic ("xpay-slow-mode" , "bool" ,
24352442 "Wait until all parts have completed before returning success or failure" ,
24362443 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 ),
24372447 NULL );
24382448}
0 commit comments