param: added json_tok_msat

This could have been a local static but its used by the run-param test,
so putting it in json.c made things easier.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith
2018-08-27 15:58:50 -05:00
committed by Rusty Russell
parent c553bba7a8
commit 4f81cd3852
4 changed files with 28 additions and 40 deletions

View File

@@ -63,6 +63,11 @@ bool json_tok_sha256(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t *tok,
struct sha256 **hash);
/* Extract positive integer, or NULL if tok is 'any'. */
bool json_tok_msat(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t * tok,
u64 **msatoshi_val);
/* Extract double in range [0.0, 100.0] */
bool json_tok_percent(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t *tok,