| 817 | AUTODATA(json_command, &feerates_command); |
| 818 | |
| 819 | static struct command_result *json_parse_feerate(struct command *cmd, |
| 820 | const char *buffer, |
| 821 | const jsmntok_t *obj UNNEEDED, |
| 822 | const jsmntok_t *params) |
| 823 | { |
| 824 | struct json_stream *response; |
| 825 | u32 *feerate; |
| 826 | |
| 827 | if (!param(cmd, buffer, params, |
| 828 | p_req("feerate", param_feerate, &feerate), |
| 829 | NULL)) |
| 830 | return command_param_failed(); |
| 831 | |
| 832 | response = json_stream_success(cmd); |
| 833 | json_add_num(response, feerate_style_name(FEERATE_PER_KSIPA), |
| 834 | feerate_to_style(*feerate, FEERATE_PER_KSIPA)); |
| 835 | return command_success(cmd, response); |
| 836 | } |
| 837 | |
| 838 | static const struct json_command parse_feerate_command = { |
| 839 | "parsefeerate", |
nothing calls this directly
no test coverage detected