Frees open (eventually, in unreserve_done callback) */
| 91 | |
| 92 | /* Frees open (eventually, in unreserve_done callback) */ |
| 93 | static void unreserve_psbt(struct pending_open *open) |
| 94 | { |
| 95 | struct out_req *req; |
| 96 | |
| 97 | plugin_log(open->p, LOG_DBG, |
| 98 | "Calling `unreserveinputs` for channel %s", |
| 99 | type_to_string(tmpctx, struct channel_id, |
| 100 | &open->channel_id)); |
| 101 | |
| 102 | req = jsonrpc_request_start(open->p, NULL, |
| 103 | "unreserveinputs", |
| 104 | unreserve_done, unreserve_done, |
| 105 | open); |
| 106 | json_add_psbt(req->js, "psbt", open->psbt); |
| 107 | send_outreq(open->p, req); |
| 108 | |
| 109 | /* We will free this in callback, but remove from list *now* |
| 110 | * to avoid calling twice! */ |
| 111 | list_del_from(&pending_opens, &open->list); |
| 112 | notleak(open); |
| 113 | } |
| 114 | |
| 115 | static void cleanup_peer_pending_opens(const struct node_id *id) |
| 116 | { |
no test coverage detected