mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +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:
parent
0153621b32
commit
f1d0325620
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue