mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
param: upgraded json_tok_newaddr
Made it a local static since its a one-off. Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
committed by
Rusty Russell
parent
947752b9cc
commit
2a0c2601c0
@@ -752,17 +752,6 @@ json_tok_address_scriptpubkey(const tal_t *cxt,
|
||||
return ADDRESS_PARSE_UNRECOGNIZED;
|
||||
}
|
||||
|
||||
bool json_tok_newaddr(const char *buffer, const jsmntok_t *tok, bool *is_p2wpkh)
|
||||
{
|
||||
if (json_tok_streq(buffer, tok, "p2sh-segwit"))
|
||||
*is_p2wpkh = false;
|
||||
else if (json_tok_streq(buffer, tok, "bech32"))
|
||||
*is_p2wpkh = true;
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool json_tok_wtx(struct wallet_tx * tx, const char * buffer,
|
||||
const jsmntok_t *sattok, u64 max)
|
||||
{
|
||||
|
||||
@@ -95,8 +95,6 @@ json_tok_address_scriptpubkey(const tal_t *ctx,
|
||||
const char *buffer,
|
||||
const jsmntok_t *tok, const u8 **scriptpubkey);
|
||||
|
||||
bool json_tok_newaddr(const char *buffer, const jsmntok_t *tok, bool *is_p2wpkh);
|
||||
|
||||
/* Parse the satoshi token in wallet_tx. */
|
||||
bool json_tok_wtx(struct wallet_tx * tx, const char * buffer,
|
||||
const jsmntok_t * sattok, u64 max);
|
||||
|
||||
@@ -50,7 +50,6 @@ struct fail_format {
|
||||
};
|
||||
|
||||
static struct fail_format fail_formats[] = {
|
||||
{json_tok_newaddr, "'%s' should be 'bech32' or 'p2sh-segwit', not '%.*s'"},
|
||||
{json_tok_wtx,
|
||||
"'%s' should be 'all' or a positive integer greater than "
|
||||
"545, not '%.*s'"},
|
||||
|
||||
@@ -48,9 +48,6 @@ void command_fail_detailed(struct command *cmd, int code,
|
||||
/* Generated stub for fmt_wireaddr_without_port */
|
||||
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
|
||||
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
|
||||
/* Generated stub for json_tok_newaddr */
|
||||
bool json_tok_newaddr(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED, bool *is_p2wpkh UNNEEDED)
|
||||
{ fprintf(stderr, "json_tok_newaddr called!\n"); abort(); }
|
||||
/* Generated stub for json_tok_wtx */
|
||||
bool json_tok_wtx(struct wallet_tx * tx UNNEEDED, const char * buffer UNNEEDED,
|
||||
const jsmntok_t * sattok UNNEEDED, u64 max UNNEEDED)
|
||||
|
||||
Reference in New Issue
Block a user