| 1054 | } |
| 1055 | |
| 1056 | static struct command_result *splice_update(struct command *cmd, |
| 1057 | struct splice_cmd *splice_cmd, |
| 1058 | size_t index) |
| 1059 | { |
| 1060 | struct splice_script_result *action = splice_cmd->actions[index]; |
| 1061 | struct out_req *req; |
| 1062 | struct splice_index_pkg *pkg = tal(cmd->plugin, struct splice_index_pkg); |
| 1063 | |
| 1064 | pkg->splice_cmd = splice_cmd; |
| 1065 | pkg->index = index; |
| 1066 | |
| 1067 | plugin_log(cmd->plugin, LOG_DBG, |
| 1068 | "splice_update(channel_id:%s)", |
| 1069 | fmt_channel_id(tmpctx, action->channel_id)); |
| 1070 | |
| 1071 | req = jsonrpc_request_start(cmd, "splice_update", |
| 1072 | splice_update_get_result, splice_error_pkg, |
| 1073 | pkg); |
| 1074 | |
| 1075 | json_add_channel_id(req->js, "channel_id", action->channel_id); |
| 1076 | json_add_psbt(req->js, "psbt", splice_cmd->psbt); |
| 1077 | |
| 1078 | return send_outreq(req); |
| 1079 | } |
| 1080 | |
| 1081 | static struct command_result *signpsbt_get_result(struct command *cmd, |
| 1082 | const char *methodname, |
no test coverage detected