| 3877 | } |
| 3878 | |
| 3879 | static struct command_result *payee_incoming_limit_step_cb(void *d UNUSED, struct payment *p) |
| 3880 | { |
| 3881 | /* Only operate at the initialization of te root payment. |
| 3882 | * Also, no point operating if payment does not support MPP anyway. |
| 3883 | */ |
| 3884 | if (p->parent || p->step != PAYMENT_STEP_INITIALIZED |
| 3885 | || !payment_supports_mpp(p)) |
| 3886 | return payment_continue(p); |
| 3887 | |
| 3888 | /* Get information on the destination. */ |
| 3889 | struct out_req *req; |
| 3890 | req = jsonrpc_request_start(payment_cmd(p), "listchannels", |
| 3891 | &payee_incoming_limit_count, |
| 3892 | &payment_rpc_failure, p); |
| 3893 | json_add_node_id(req->js, "source", p->route_destination); |
| 3894 | return send_outreq(req); |
| 3895 | } |
| 3896 | |
| 3897 | REGISTER_PAYMENT_MODIFIER(payee_incoming_limit, void *, NULL, |
| 3898 | payee_incoming_limit_step_cb); |
nothing calls this directly
no test coverage detected