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

fee_setting: fix factor miscalulation bug #119

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

3nprob
Copy link

@3nprob 3nprob commented Apr 4, 2022

Output is confusing when factors don't match up with actual ratio - I assume this is a bug?

Also moving down rounding to after calculations to get it correct.

@3nprob 3nprob marked this pull request as draft April 4, 2022 18:10
@3nprob 3nprob marked this pull request as ready for review April 5, 2022 16:01
Copy link
Owner

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for spotting this. I think we should just guard against zero division errors. Perhaps something like:
factor_base_fee = base_fee_msat_new / base_fee_msat if base_fee_msat else float('inf')

lndmanage/lib/fee_setting.py Outdated Show resolved Hide resolved
lndmanage/lib/fee_setting.py Outdated Show resolved Hide resolved
@bitromortac bitromortac merged commit 2dc2fae into bitromortac:master Apr 19, 2022
@bitromortac
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants