prusnak / suez

Tool for pretty printing and optimizing Lightning Network channels.
GNU General Public License v3.0
78 stars 20 forks source link

Inaccurate local fees calculation #40

Closed lirre8 closed 1 year ago

lirre8 commented 1 year ago

Local fees for each channel are added as an integer value of number of sats, which means that any decimals are lost resulting in the fees displayed in the table might be very inaccurate from the truth.

A solution would be to store the fees as milli sats on the channel object. Both lnd and cln returns the fee as msat. And then divide by 1000 and round to nearest integer when setting the values to be displayed in the table.

I have working code for this running locally. Let me know if you want me to create a PR.

prusnak commented 1 year ago

Yes, please, create a PR. Thanks! 🙏

lirre8 commented 1 year ago

Done: https://github.com/prusnak/suez/pull/41