| 1196 | } |
| 1197 | |
| 1198 | static struct command_result *unreserve_path(struct command *aux_cmd, |
| 1199 | struct attempt *attempt) |
| 1200 | { |
| 1201 | struct out_req *req; |
| 1202 | |
| 1203 | req = payment_ignored_req(aux_cmd, attempt, "askrene-unreserve"); |
| 1204 | json_array_start(req->js, "path"); |
| 1205 | for (size_t i = 0; i < tal_count(attempt->hops); i++) { |
| 1206 | const struct hop *hop = &attempt->hops[i]; |
| 1207 | json_object_start(req->js, NULL); |
| 1208 | json_add_short_channel_id_dir(req->js, "short_channel_id_dir", hop->scidd); |
| 1209 | json_add_amount_msat(req->js, "amount_msat", hop->amount_out); |
| 1210 | if (hop->fake_channel) |
| 1211 | json_add_string(req->js, "layer", attempt->payment->private_layer); |
| 1212 | json_object_end(req->js); |
| 1213 | } |
| 1214 | json_array_end(req->js); |
| 1215 | return send_payment_req(aux_cmd, attempt->payment, req); |
| 1216 | } |
| 1217 | |
| 1218 | static struct command_result *injectpaymentonion_failed(struct command *aux_cmd, |
| 1219 | const char *method, |
no test coverage detected