mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
ping: no longer a dev_ command.
Fixes: #1407 Suggested-by: conanoc@gmail.com Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
be7a27a765
commit
71575b2115
@@ -80,7 +80,7 @@ LIGHTNINGD_SRC := \
|
||||
|
||||
# Source files without corresponding headers
|
||||
LIGHTNINGD_SRC_NOHDR := \
|
||||
lightningd/dev_ping.c \
|
||||
lightningd/ping.c \
|
||||
lightningd/memdump.c
|
||||
|
||||
LIGHTNINGD_OBJS := $(LIGHTNINGD_SRC:.c=.o) $(LIGHTNINGD_SRC_NOHDR:.c=.o)
|
||||
|
||||
@@ -35,8 +35,8 @@ static void ping_reply(struct subd *subd, const u8 *msg, const int *fds UNUSED,
|
||||
}
|
||||
}
|
||||
|
||||
static void json_dev_ping(struct command *cmd,
|
||||
const char *buffer, const jsmntok_t *params)
|
||||
static void json_ping(struct command *cmd,
|
||||
const char *buffer, const jsmntok_t *params)
|
||||
{
|
||||
u8 *msg;
|
||||
unsigned int len, pongbytes;
|
||||
@@ -44,8 +44,8 @@ static void json_dev_ping(struct command *cmd,
|
||||
|
||||
if (!param(cmd, buffer, params,
|
||||
p_req("id", json_tok_pubkey, &id),
|
||||
p_req("len", json_tok_number, &len),
|
||||
p_req("pongbytes", json_tok_number, &pongbytes),
|
||||
p_opt_def("len", json_tok_number, &len, 128),
|
||||
p_opt_def("pongbytes", json_tok_number, &pongbytes, 128),
|
||||
NULL))
|
||||
return;
|
||||
|
||||
@@ -83,9 +83,9 @@ static void json_dev_ping(struct command *cmd,
|
||||
command_still_pending(cmd);
|
||||
}
|
||||
|
||||
static const struct json_command dev_ping_command = {
|
||||
"dev-ping",
|
||||
json_dev_ping,
|
||||
"Send {peerid} a ping of length {len} asking for {pongbytes}"
|
||||
static const struct json_command ping_command = {
|
||||
"ping",
|
||||
json_ping,
|
||||
"Send {peerid} a ping of length {len} (default 128) asking for {pongbytes} (default 128)"
|
||||
};
|
||||
AUTODATA(json_command, &dev_ping_command);
|
||||
AUTODATA(json_command, &ping_command);
|
||||
Reference in New Issue
Block a user