Browse Source

param_feerate: parse numbers correctly.

If you used feerate=750, instead of feerate="750" it didn't work, since the
token is not a string.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON RPC: `withdraw` and `txprepare` `feerate` can be a JSON number.
keysend
Rusty Russell 5 years ago
committed by Christian Decker
parent
commit
972432d285
  1. 2
      common/json_tok.c

2
common/json_tok.c

@ -355,7 +355,7 @@ struct command_result *param_feerate_val(struct command *cmd,
buffer + base.start);
}
if (json_tok_streq(buffer, &suffix, "")
if (suffix.end == suffix.start
|| json_tok_streq(buffer, &suffix,
feerate_style_name(FEERATE_PER_KBYTE))) {
style = FEERATE_PER_KBYTE;

Loading…
Cancel
Save