mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
daemon: dev-mocktime command
Useful for precise timing control for testing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "controlled_time.h"
|
||||
#include "lightningd.h"
|
||||
#include "timeout.h"
|
||||
|
||||
@@ -14,7 +15,7 @@ void refresh_timeout(struct lightningd_state *dstate, struct timeout *t)
|
||||
{
|
||||
timer_del(&dstate->timers, &t->timer);
|
||||
timer_add(&dstate->timers, &t->timer,
|
||||
timeabs_add(time_now(), t->interval));
|
||||
timeabs_add(controlled_time(), t->interval));
|
||||
}
|
||||
|
||||
/* FIXME: Make all timers one-shot! */
|
||||
|
||||
Reference in New Issue
Block a user