daemon: test restarting.

We add a "dev-restart" command which causes the daemon to close fds
and exec itself.  Then we do it after every command, with the caveat
that we always send a commit before newhtlc, because if not committed,
that is forgotten.  Fulfillhtlc and failhtlc get resent, since they're
idempotent.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:25:14 +09:30
parent 5f368f1c95
commit 190b30e958
9 changed files with 178 additions and 9 deletions

View File

@@ -2,8 +2,11 @@
#define LIGHTNING_DAEMON_CONTROLLED_TIME_H
#include "config.h"
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include <ccan/time/time.h>
struct timeabs controlled_time(void);
void controlled_time_register_opts(void);
char *controlled_time_arg(const tal_t *ctx);
#endif /* LIGHTNING_DAEMON_CONTROLLED_TIME_H */