askrene: ignore disabled channels for min-cost-flow.

We also set htlc_max to 0 when disabling, so the tests worked, but
this is correct.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-10-04 09:03:53 +09:30
parent 154ad585ec
commit bb3663c4a0

View file

@ -626,7 +626,7 @@ init_linear_network(const tal_t *ctx, const struct pay_parameters *params)
const struct gossmap_chan *c = gossmap_nth_chan(gossmap,
node, j, &half);
if (!gossmap_chan_set(c, half))
if (!gossmap_chan_set(c, half) || !c->half[half].enabled)
continue;
const u32 chan_id = gossmap_chan_idx(gossmap, c);