Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

sangaman
Copy link
Collaborator

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.

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.
@sangaman sangaman added bug Something isn't working lightning Lightning network & lnd integration labels Nov 10, 2020
@sangaman sangaman requested a review from michael1011 November 10, 2020 17:39
@sangaman sangaman self-assigned this Nov 10, 2020
@kilrau
Copy link
Contributor

kilrau commented Nov 10, 2020

I was honestly not aware that tradinglimits is already accounting for the channel reserve. Closing #1945.

@sangaman sangaman merged commit 298d1a1 into master Nov 11, 2020
@sangaman sangaman deleted the fix/lnd-capacities-calc branch November 11, 2020 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lightning Lightning network & lnd integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants