| 294 | } |
| 295 | |
| 296 | static const struct constraint *add_constraint(struct layer *layer, |
| 297 | const struct short_channel_id_dir *scidd, |
| 298 | u64 timestamp, |
| 299 | const struct amount_msat *min, |
| 300 | const struct amount_msat *max) |
| 301 | { |
| 302 | struct constraint *c = tal(layer, struct constraint); |
| 303 | c->scidd = *scidd; |
| 304 | |
| 305 | if (min) |
| 306 | c->min = *min; |
| 307 | else |
| 308 | c->min = AMOUNT_MSAT(0); |
| 309 | if (max) |
| 310 | c->max = *max; |
| 311 | else |
| 312 | c->max = AMOUNT_MSAT(UINT64_MAX); |
| 313 | c->timestamp = timestamp; |
| 314 | |
| 315 | constraint_hash_add(layer->constraints, c); |
| 316 | return c; |
| 317 | } |
| 318 | |
| 319 | static const struct bias *set_bias(struct layer *layer, |
| 320 | const struct short_channel_id_dir *scidd, |
no outgoing calls
no test coverage detected