mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
json_tok_len, json_tok_contents: rename to json_tok_full_len and json_tok_full
These are only supposed to be used when you want the token contents including surrounding "". We should use this when reporting errors, but usually we just want to access the tok members directly. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -114,7 +114,7 @@ bool json_tok_pubkey(struct command *cmd, const char *name,
|
||||
|
||||
command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||
"'%s' should be a pubkey, not '%.*s'",
|
||||
name, tok->end - tok->start, buffer + tok->start);
|
||||
name, json_tok_full_len(tok), json_tok_full(buffer, tok));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ bool json_tok_short_channel_id(struct command *cmd, const char *name,
|
||||
|
||||
command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||
"'%s' should be a short channel id, not '%.*s'",
|
||||
name, tok->end - tok->start, buffer + tok->start);
|
||||
name, json_tok_full_len(tok), json_tok_full(buffer, tok));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ bool json_tok_feerate_style(struct command *cmd, const char *name,
|
||||
name,
|
||||
json_feerate_style_name(FEERATE_PER_KSIPA),
|
||||
json_feerate_style_name(FEERATE_PER_KBYTE),
|
||||
tok->end - tok->start, buffer + tok->start);
|
||||
json_tok_full_len(tok), json_tok_full(buffer, tok));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user