Browse Source

json: Rename `json_tok_address_scriptpubkey` to `json_to_address_scriptpubkey`

Our json naming style is like `json_to_***`.
travis-debug
trueptolemy 5 years ago
committed by neil saitug
parent
commit
7db3f1b8a6
  1. 2
      lightningd/invoice.c
  2. 2
      lightningd/json.h
  3. 2
      lightningd/jsonrpc.c
  4. 6
      lightningd/test/run-invoice-select-inchan.c
  5. 4
      wallet/walletrpc.c

2
lightningd/invoice.c

@ -300,7 +300,7 @@ static struct command_result *parse_fallback(struct command *cmd,
enum address_parse_result fallback_parse;
fallback_parse
= json_tok_address_scriptpubkey(cmd,
= json_to_address_scriptpubkey(cmd,
get_chainparams(cmd->ld),
buffer, fallback,
fallback_script);

2
lightningd/json.h

@ -196,7 +196,7 @@ enum address_parse_result {
/* Return result of address parsing and fills in *scriptpubkey
* allocated off ctx if ADDRESS_PARSE_SUCCESS
*/
enum address_parse_result json_tok_address_scriptpubkey(const tal_t *ctx,
enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx,
const struct chainparams *chainparams,
const char *buffer,
const jsmntok_t *tok, const u8 **scriptpubkey);

2
lightningd/jsonrpc.c

@ -999,7 +999,7 @@ static const char *segwit_addr_net_decode(int *witness_version,
}
enum address_parse_result
json_tok_address_scriptpubkey(const tal_t *ctx,
json_to_address_scriptpubkey(const tal_t *ctx,
const struct chainparams *chainparams,
const char *buffer,
const jsmntok_t *tok, const u8 **scriptpubkey)

6
lightningd/test/run-invoice-select-inchan.c

@ -233,12 +233,12 @@ struct json_stream *json_stream_fail(struct command *cmd UNNEEDED,
/* Generated stub for json_stream_success */
struct json_stream *json_stream_success(struct command *cmd UNNEEDED)
{ fprintf(stderr, "json_stream_success called!\n"); abort(); }
/* Generated stub for json_tok_address_scriptpubkey */
enum address_parse_result json_tok_address_scriptpubkey(const tal_t *ctx UNNEEDED,
/* Generated stub for json_to_address_scriptpubkey */
enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx UNNEEDED,
const struct chainparams *chainparams UNNEEDED,
const char *buffer UNNEEDED,
const jsmntok_t *tok UNNEEDED, const u8 **scriptpubkey UNNEEDED)
{ fprintf(stderr, "json_tok_address_scriptpubkey called!\n"); abort(); }
{ fprintf(stderr, "json_to_address_scriptpubkey called!\n"); abort(); }
/* Generated stub for json_tok_channel_id */
bool json_tok_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
struct channel_id *cid UNNEEDED)

4
wallet/walletrpc.c

@ -80,7 +80,7 @@ static struct command_result *param_bitcoin_address(struct command *cmd,
const u8 **scriptpubkey)
{
/* Parse address. */
switch (json_tok_address_scriptpubkey(cmd,
switch (json_to_address_scriptpubkey(cmd,
get_chainparams(cmd->ld),
buffer, tok,
scriptpubkey)) {
@ -345,7 +345,7 @@ static struct command_result *json_prepare_tx(struct command *cmd,
"The output format must be "
"{destination: amount}");
res = json_tok_address_scriptpubkey(cmd,
res = json_to_address_scriptpubkey(cmd,
get_chainparams(cmd->ld),
buffer, &t[1],
&destination);

Loading…
Cancel
Save