param: upgraded json_tok_double

Also renamed old version to json_to_double for use as a utility funciton.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith
2018-08-13 11:42:11 -05:00
committed by Rusty Russell
parent bab8ff991a
commit e5918f4e5a
9 changed files with 50 additions and 30 deletions

View File

@@ -33,7 +33,7 @@ bool json_to_u64(const char *buffer, const jsmntok_t *tok,
uint64_t *num);
/* Extract double from this (must be a number literal) */
bool json_tok_double(const char *buffer, const jsmntok_t *tok, double *num);
bool json_to_double(const char *buffer, const jsmntok_t *tok, double *num);
/* Extract satoshis from this (may be a string, or a decimal number literal) */
bool json_tok_bitcoin_amount(const char *buffer, const jsmntok_t *tok,