| 447 | } |
| 448 | |
| 449 | struct command_result *find_best_peer_(struct command *cmd, |
| 450 | u64 needed_features, |
| 451 | const struct amount_msat *amount, |
| 452 | const struct pubkey *fronting_nodes, |
| 453 | struct command_result *(*cb)(struct command *, |
| 454 | const struct chaninfo *, |
| 455 | void *), |
| 456 | void *arg) |
| 457 | { |
| 458 | struct out_req *req; |
| 459 | struct find_best_peer_data *data = tal(cmd, struct find_best_peer_data); |
| 460 | data->cb = cb; |
| 461 | data->arg = arg; |
| 462 | data->amount = tal_dup_or_null(data, struct amount_msat, amount); |
| 463 | data->needed_features = needed_features; |
| 464 | if (fronting_nodes) |
| 465 | data->fronting_nodes = tal_dup_talarr(data, struct pubkey, fronting_nodes); |
| 466 | else |
| 467 | data->fronting_nodes = NULL; |
| 468 | req = jsonrpc_request_start(cmd, "listincoming", |
| 469 | listincoming_done, forward_error, data); |
| 470 | return send_outreq(req); |
| 471 | } |
| 472 | |
| 473 | static const struct plugin_hook hooks[] = { |
| 474 | { |
nothing calls this directly
no test coverage detected