From 74ddc154350ee447841d009de2556b5b6bc11cfb Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 6 May 2022 14:10:45 +0200 Subject: [PATCH] route: Do not require both directions to be active This likely lead to a number of false errors when attempting to route. We deemed a channel to be unusable as soon as either direction isn't usable. This is bad since it excludes not only zeroconf channels (which have different scids for the two directions), but it also excludes any channel that we haven't seen an update from yet. This was likely introduced when attemting to exclude nodes that haven't sent a disable, but their peer has, but this is not necessary as the unresponsive node would be marked as isolated by all its peers, so we don't need to artificially mark a channel direction as disabled when really we can't even enter the node to traverse the channel in that direction. Changelog-Fixed: routing: Fixed an issue where we would exclude the entire channel if either direction was disabled, or we hadn't seen an update yet. --- common/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/route.c b/common/route.c index 04d590643..3ad9b4e96 100644 --- a/common/route.c +++ b/common/route.c @@ -25,7 +25,7 @@ bool route_can_carry(const struct gossmap *map, struct amount_msat amount, void *arg) { - if (!c->half[dir].enabled || !c->half[!dir].enabled) + if (!c->half[dir].enabled) return false; return route_can_carry_even_disabled(map, c, dir, amount, arg); }