| 789 | } |
| 790 | |
| 791 | static struct command_result *feerate_get_result(struct command *cmd, |
| 792 | const char *method, |
| 793 | const char *buf, |
| 794 | const jsmntok_t *result, |
| 795 | struct splice_cmd *splice_cmd) |
| 796 | { |
| 797 | const jsmntok_t *tok = json_get_member(buf, result, "perkw"); |
| 798 | tok = json_get_member(buf, tok, "splice"); |
| 799 | |
| 800 | if (!json_to_u32(buf, tok, &splice_cmd->feerate_per_kw)) |
| 801 | return command_fail_badparam(cmd, "opening", buf, |
| 802 | tok, "invalid u32"); |
| 803 | |
| 804 | if (!splice_cmd->feerate_per_kw) |
| 805 | return command_fail(splice_cmd->cmd, |
| 806 | JSONRPC2_INVALID_PARAMS, |
| 807 | "Failed to load a default feerate"); |
| 808 | |
| 809 | plugin_log(cmd->plugin, LOG_DBG, |
| 810 | "got feerate %"PRIu32" perkw", splice_cmd->feerate_per_kw); |
| 811 | |
| 812 | return continue_splice(splice_cmd->cmd, splice_cmd); |
| 813 | } |
| 814 | |
| 815 | static struct command_result *load_feerate(struct command *cmd, |
| 816 | struct splice_cmd *splice_cmd) |
nothing calls this directly
no test coverage detected