Skip to content

Commit

Permalink
topo: Fix issue considering the wrong direction for capacity limits
Browse files Browse the repository at this point in the history
Changelog-Fixed: topology: Under some circumstances we were considering the limits on the wrong direction for a channel
  • Loading branch information
cdecker committed May 24, 2022
1 parent 0153621 commit f504765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f504765

Please sign in to comment.