| 994 | } |
| 995 | |
| 996 | void layer_apply_constraints(const struct layer *layer, |
| 997 | const struct short_channel_id_dir *scidd, |
| 998 | struct amount_msat *min, |
| 999 | struct amount_msat *max) |
| 1000 | { |
| 1001 | struct constraint *c; |
| 1002 | struct constraint_hash_iter cit; |
| 1003 | |
| 1004 | /* We can have more than one: apply them all! */ |
| 1005 | for (c = constraint_hash_getfirst(layer->constraints, scidd, &cit); |
| 1006 | c; |
| 1007 | c = constraint_hash_getnext(layer->constraints, scidd, &cit)) { |
| 1008 | *min = amount_msat_max(*min, c->min); |
| 1009 | *max = amount_msat_min(*max, c->max); |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | const struct constraint *layer_add_constraint(struct layer *layer, |
| 1014 | const struct short_channel_id_dir *scidd, |
no test coverage detected