lightningd/json: make wallet_tx functions take amount_sat.

Using param_tok is generally deprecated, as it doesn't give any sanity checking
for the JSON 'check' command.  So make param_wtx usable directly, and
also make it have a struct amount_sat.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-02-21 13:08:42 +10:30
parent 3ba544bfde
commit 2632cc3f34
7 changed files with 96 additions and 79 deletions

View File

@@ -157,9 +157,4 @@ enum address_parse_result json_tok_address_scriptpubkey(const tal_t *ctx,
const struct chainparams *chainparams,
const char *buffer,
const jsmntok_t *tok, const u8 **scriptpubkey);
/* Parse the satoshi token in wallet_tx. */
struct command_result *param_wtx(struct wallet_tx * tx, const char * buffer,
const jsmntok_t * sattok, u64 max);
#endif /* LIGHTNING_LIGHTNINGD_JSON_H */