| 3919 | } |
| 3920 | |
| 3921 | static void route_exclusions_step_cb(struct route_exclusions_data *d, |
| 3922 | struct payment *p) |
| 3923 | { |
| 3924 | if (p->parent) |
| 3925 | return payment_continue(p); |
| 3926 | struct route_exclusion **exclusions = d->exclusions; |
| 3927 | for (size_t i = 0; i < tal_count(exclusions); i++) { |
| 3928 | struct route_exclusion *e = exclusions[i]; |
| 3929 | if (e->type == EXCLUDE_CHANNEL) { |
| 3930 | channel_hints_update(p, e->u.chan_id.scid, e->u.chan_id.dir, |
| 3931 | false, false, NULL, NULL); |
| 3932 | } else { |
| 3933 | if (node_id_eq(&e->u.node_id, p->destination)) { |
| 3934 | payment_abort(p, "Payee is manually excluded"); |
| 3935 | return; |
| 3936 | } else if (node_id_eq(&e->u.node_id, p->local_id)) { |
| 3937 | payment_abort(p, "Payer is manually excluded"); |
| 3938 | return; |
| 3939 | } |
| 3940 | |
| 3941 | tal_arr_expand(&p->excluded_nodes, e->u.node_id); |
| 3942 | } |
| 3943 | } |
| 3944 | payment_continue(p); |
| 3945 | } |
| 3946 | |
| 3947 | REGISTER_PAYMENT_MODIFIER(route_exclusions, struct route_exclusions_data *, |
| 3948 | route_exclusions_data_init, route_exclusions_step_cb); |
nothing calls this directly
no test coverage detected