mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
common/json_tok: minor cleanup to bitcoin_outpoint array parsing.
No reason to use a temp var here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
6f205896aa
commit
094889f50f
1 changed files with 1 additions and 3 deletions
|
@ -520,13 +520,11 @@ struct command_result *param_outpoint_arr(struct command *cmd,
|
||||||
*outpoints = tal_arr(cmd, struct bitcoin_outpoint, tok->size);
|
*outpoints = tal_arr(cmd, struct bitcoin_outpoint, tok->size);
|
||||||
|
|
||||||
json_for_each_arr(i, curr, tok) {
|
json_for_each_arr(i, curr, tok) {
|
||||||
struct bitcoin_outpoint op;
|
if (!json_to_outpoint(buffer, curr, &(*outpoints)[i]))
|
||||||
if (!json_to_outpoint(buffer, curr, &op))
|
|
||||||
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
|
||||||
"Could not decode outpoint \"%.*s\", "
|
"Could not decode outpoint \"%.*s\", "
|
||||||
"expected format: txid:output",
|
"expected format: txid:output",
|
||||||
json_tok_full_len(curr), json_tok_full(buffer, curr));
|
json_tok_full_len(curr), json_tok_full(buffer, curr));
|
||||||
(*outpoints)[i] = op;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue