mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
topo: Fix issue considering the wrong direction for capacity limits
Changelog-Fixed: topology: Under some circumstances we were considering the limits on the wrong direction for a channel
This commit is contained in:
committed by
Rusty Russell
parent
0153621b32
commit
f1d0325620
@@ -557,9 +557,9 @@ static struct amount_msat peer_capacity(const struct gossmap *gossmap,
|
||||
continue;
|
||||
if (!c->half[!dir].enabled)
|
||||
continue;
|
||||
if (!amount_msat_add(&capacity, capacity,
|
||||
amount_msat(fp16_to_u64(c->half[dir]
|
||||
.htlc_max))))
|
||||
if (!amount_msat_add(
|
||||
&capacity, capacity,
|
||||
amount_msat(fp16_to_u64(c->half[!dir].htlc_max))))
|
||||
continue;
|
||||
}
|
||||
return capacity;
|
||||
|
||||
Reference in New Issue
Block a user