| 5 | #include <common/route.h> |
| 6 | |
| 7 | bool route_can_carry_even_disabled(const struct gossmap *map, |
| 8 | const struct gossmap_chan *c, |
| 9 | int dir, |
| 10 | struct amount_msat amount, |
| 11 | void *unused) |
| 12 | { |
| 13 | if (!gossmap_chan_set(c, dir)) |
| 14 | return false; |
| 15 | /* Amount 0 is a special "ignore min" probe case */ |
| 16 | if (!amount_msat_is_zero(amount) |
| 17 | && !gossmap_chan_has_capacity(c, dir, amount)) |
| 18 | return false; |
| 19 | return true; |
| 20 | } |
| 21 | |
| 22 | /* Generally only one side gets marked disabled, but it's disabled. */ |
| 23 | bool route_can_carry(const struct gossmap *map, |