mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
dev_restart: remove this command.
We'll end up doing this via packet traffic (like permfail) I imagine. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8c22bd9ee1
commit
0170224fd0
@ -231,41 +231,6 @@ static const struct json_command dev_crash_command = {
|
||||
};
|
||||
AUTODATA(json_command, &dev_crash_command);
|
||||
|
||||
/* UNIFICATION FIXME */
|
||||
void debug_dump_peers(struct lightningd_state *dstate);
|
||||
|
||||
static void json_restart(struct command *cmd,
|
||||
const char *buffer, const jsmntok_t *params)
|
||||
{
|
||||
const jsmntok_t *p, *end;
|
||||
size_t n = 0;
|
||||
|
||||
if (params->type != JSMN_ARRAY) {
|
||||
command_fail(cmd, "Need array to reexec");
|
||||
return;
|
||||
}
|
||||
end = json_next(params);
|
||||
|
||||
cmd->dstate->reexec = tal_arrz(cmd->dstate, char *, n+1);
|
||||
for (p = params + 1; p != end; p = json_next(p)) {
|
||||
tal_resizez(&cmd->dstate->reexec, n+2);
|
||||
cmd->dstate->reexec[n++] = tal_strndup(cmd->dstate->reexec,
|
||||
buffer + p->start,
|
||||
p->end - p->start);
|
||||
}
|
||||
debug_dump_peers(cmd->dstate);
|
||||
io_break(cmd->dstate);
|
||||
command_success(cmd, null_response(cmd));
|
||||
}
|
||||
|
||||
static const struct json_command dev_restart_command = {
|
||||
"dev-restart",
|
||||
json_restart,
|
||||
"Re-exec the given {binary}.",
|
||||
"Simple restart test for developers"
|
||||
};
|
||||
AUTODATA(json_command, &dev_restart_command);
|
||||
|
||||
static void json_getinfo(struct command *cmd,
|
||||
const char *buffer, const jsmntok_t *params)
|
||||
{
|
||||
|
@ -46,12 +46,6 @@ struct peer *find_peer_by_unique_id(struct lightningd *ld, u64 unique_id)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void debug_dump_peers(struct lightningd_state *dstate);
|
||||
void debug_dump_peers(struct lightningd_state *dstate)
|
||||
{
|
||||
FIXME_IMPLEMENT();
|
||||
}
|
||||
|
||||
void notify_new_block(struct chain_topology *topo, u32 height);
|
||||
void notify_new_block(struct chain_topology *topo, u32 height)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user