mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
dev-ping: use id not peerid as argument name.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -40,17 +40,17 @@ static void json_dev_ping(struct command *cmd,
|
|||||||
{
|
{
|
||||||
struct peer *peer;
|
struct peer *peer;
|
||||||
u8 *msg;
|
u8 *msg;
|
||||||
jsmntok_t *peeridtok, *lentok, *pongbytestok;
|
jsmntok_t *idtok, *lentok, *pongbytestok;
|
||||||
unsigned int len, pongbytes;
|
unsigned int len, pongbytes;
|
||||||
struct pubkey id;
|
struct pubkey id;
|
||||||
struct subd *owner;
|
struct subd *owner;
|
||||||
|
|
||||||
if (!json_get_params(buffer, params,
|
if (!json_get_params(buffer, params,
|
||||||
"peerid", &peeridtok,
|
"id", &idtok,
|
||||||
"len", &lentok,
|
"len", &lentok,
|
||||||
"pongbytes", &pongbytestok,
|
"pongbytes", &pongbytestok,
|
||||||
NULL)) {
|
NULL)) {
|
||||||
command_fail(cmd, "Need peerid, len and pongbytes");
|
command_fail(cmd, "Need id, len and pongbytes");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,10 +70,10 @@ static void json_dev_ping(struct command *cmd,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!json_tok_pubkey(buffer, peeridtok, &id)) {
|
if (!json_tok_pubkey(buffer, idtok, &id)) {
|
||||||
command_fail(cmd, "'%.*s' is not a valid pubkey",
|
command_fail(cmd, "'%.*s' is not a valid pubkey",
|
||||||
(int)(peeridtok->end - peeridtok->start),
|
(int)(idtok->end - idtok->start),
|
||||||
buffer + peeridtok->start);
|
buffer + idtok->start);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ static void json_dev_ping(struct command *cmd,
|
|||||||
static const struct json_command dev_ping_command = {
|
static const struct json_command dev_ping_command = {
|
||||||
"dev-ping",
|
"dev-ping",
|
||||||
json_dev_ping,
|
json_dev_ping,
|
||||||
"Offer {peerid} a ping of length {len} asking for {pongbytes}",
|
"Offer {id} a ping of length {len} asking for {pongbytes}",
|
||||||
"Returns { totlen: u32 } on success"
|
"Returns { totlen: u32 } on success"
|
||||||
};
|
};
|
||||||
AUTODATA(json_command, &dev_ping_command);
|
AUTODATA(json_command, &dev_ping_command);
|
||||||
|
|||||||
Reference in New Issue
Block a user