| 802 | AUTODATA(json_command, &feerates_command); |
| 803 | |
| 804 | static struct command_result *json_parse_feerate(struct command *cmd, |
| 805 | const char *buffer, |
| 806 | const jsmntok_t *obj UNNEEDED, |
| 807 | const jsmntok_t *params) |
| 808 | { |
| 809 | struct json_stream *response; |
| 810 | u32 *feerate; |
| 811 | |
| 812 | if (!param(cmd, buffer, params, |
| 813 | p_req("feerate", param_feerate, &feerate), |
| 814 | NULL)) |
| 815 | return command_param_failed(); |
| 816 | |
| 817 | response = json_stream_success(cmd); |
| 818 | json_add_num(response, feerate_style_name(FEERATE_PER_KSIPA), |
| 819 | feerate_to_style(*feerate, FEERATE_PER_KSIPA)); |
| 820 | return command_success(cmd, response); |
| 821 | } |
| 822 | |
| 823 | static const struct json_command parse_feerate_command = { |
| 824 | "parsefeerate", |
nothing calls this directly
no test coverage detected