Frees open (eventually, in unreserve_done callback) */
| 90 | |
| 91 | /* Frees open (eventually, in unreserve_done callback) */ |
| 92 | static struct command_result *unreserve_psbt(struct command *cmd, |
| 93 | struct pending_open *open) |
| 94 | { |
| 95 | struct out_req *req; |
| 96 | struct command *aux; |
| 97 | |
| 98 | plugin_log(open->p, LOG_DBG, |
| 99 | "Calling `unreserveinputs` for channel %s", |
| 100 | fmt_channel_id(tmpctx, |
| 101 | &open->channel_id)); |
| 102 | |
| 103 | /* This can outlive the underlying cmd, so use an aux! */ |
| 104 | aux = aux_command(cmd); |
| 105 | req = jsonrpc_request_start(aux, |
| 106 | "unreserveinputs", |
| 107 | unreserve_done, unreserve_done, |
| 108 | open); |
| 109 | json_add_psbt(req->js, "psbt", open->psbt); |
| 110 | send_outreq(req); |
| 111 | |
| 112 | /* We will free this in callback, but remove from list *now* |
| 113 | * to avoid calling twice! */ |
| 114 | list_del_from(&pending_opens, &open->list); |
| 115 | tal_steal(aux, open); |
| 116 | |
| 117 | return command_still_pending(aux); |
| 118 | } |
| 119 | |
| 120 | static void cleanup_peer_pending_opens(struct command *cmd, |
| 121 | const struct node_id *id) |
no test coverage detected