From 972432d2854bd127f1cda194ee9f615781484180 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 8 Jul 2020 06:20:24 +0930 Subject: [PATCH] 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 Changelog-Fixed: JSON RPC: `withdraw` and `txprepare` `feerate` can be a JSON number. --- common/json_tok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/json_tok.c b/common/json_tok.c index 8c7952157..1fd62a853 100644 --- a/common/json_tok.c +++ b/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;