| 529 | AUTODATA(json_command, &feerates_command); |
| 530 | |
| 531 | static struct command_result *json_parse_feerate(struct command *cmd, |
| 532 | const char *buffer, |
| 533 | const jsmntok_t *obj UNNEEDED, |
| 534 | const jsmntok_t *params) |
| 535 | { |
| 536 | struct json_stream *response; |
| 537 | u32 *feerate; |
| 538 | |
| 539 | if (!param(cmd, buffer, params, |
| 540 | p_req("feerate", param_feerate, &feerate), |
| 541 | NULL)) |
| 542 | return command_param_failed(); |
| 543 | |
| 544 | response = json_stream_success(cmd); |
| 545 | json_add_num(response, feerate_style_name(FEERATE_PER_KSIPA), |
| 546 | feerate_to_style(*feerate, FEERATE_PER_KSIPA)); |
| 547 | return command_success(cmd, response); |
| 548 | } |
| 549 | |
| 550 | static const struct json_command parse_feerate_command = { |
| 551 | "parsefeerate", |
nothing calls this directly
no test coverage detected