ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

fix(lnd): don't calculate negative capacities #1988

Closed sangaman closed 3 years ago

sangaman commented 3 years ago

This fixes a bug in the logic for calculating the inbound & outbound amount/capacity totals. We subtract the channel reserve amounts from the balances when determining how large a payment the channel could support, however we should not end up with a negative number.

kilrau commented 3 years ago

I was honestly not aware that tradinglimits is already accounting for the channel reserve. Closing https://github.com/ExchangeUnion/xud/issues/1945.