| 2017 | } |
| 2018 | |
| 2019 | static struct command_result *handle_splice_cmd(struct command *cmd, |
| 2020 | struct splice_cmd *splice_cmd) |
| 2021 | { |
| 2022 | struct out_req *req; |
| 2023 | |
| 2024 | if (splice_cmd->dryrun) |
| 2025 | return splice_dryrun(cmd, splice_cmd); |
| 2026 | |
| 2027 | req = jsonrpc_request_start(cmd, "stfu_channels", |
| 2028 | stfu_channels_get_result, |
| 2029 | splice_error, splice_cmd); |
| 2030 | |
| 2031 | json_array_start(req->js, "channel_ids"); |
| 2032 | /* We begin by stfu'ing and getting available balance on all MAX reqs */ |
| 2033 | for (size_t i = 0; i < tal_count(splice_cmd->actions); i++) |
| 2034 | if (splice_cmd->actions[i]->channel_id) |
| 2035 | json_add_channel_id(req->js, NULL, |
| 2036 | splice_cmd->actions[i]->channel_id); |
| 2037 | json_array_end(req->js); |
| 2038 | |
| 2039 | return send_outreq(req); |
| 2040 | } |
| 2041 | |
| 2042 | static struct command_result * |
| 2043 | validate_splice_cmd(struct splice_cmd *splice_cmd) |
no test coverage detected