| 3861 | } |
| 3862 | |
| 3863 | static struct command_result *payee_incoming_limit_step_cb(void *d UNUSED, struct payment *p) |
| 3864 | { |
| 3865 | /* Only operate at the initialization of te root payment. |
| 3866 | * Also, no point operating if payment does not support MPP anyway. |
| 3867 | */ |
| 3868 | if (p->parent || p->step != PAYMENT_STEP_INITIALIZED |
| 3869 | || !payment_supports_mpp(p)) |
| 3870 | return payment_continue(p); |
| 3871 | |
| 3872 | /* Get information on the destination. */ |
| 3873 | struct out_req *req; |
| 3874 | req = jsonrpc_request_start(payment_cmd(p), "listchannels", |
| 3875 | &payee_incoming_limit_count, |
| 3876 | &payment_rpc_failure, p); |
| 3877 | json_add_node_id(req->js, "source", p->route_destination); |
| 3878 | return send_outreq(req); |
| 3879 | } |
| 3880 | |
| 3881 | REGISTER_PAYMENT_MODIFIER(payee_incoming_limit, void *, NULL, |
| 3882 | payee_incoming_limit_step_cb); |
nothing calls this directly
no test coverage detected