Repository navigation
Conversation
Extract the server's big-integer fee arithmetic into a shared client utility. Preserve rounding down while checking the final amount before conversion, allowing intermediate products larger than int64.
|
Findings:
Nits:
|
268ddbc to
27f682a
Compare
Use the shared fee arithmetic before applying static Loop In and instant Loop Out fee limits. Overflowing multiplication could otherwise produce negative or deceptively small fees that bypassed those limits. Reject invalid server rates through the existing static Loop In abort path, and validate reconstructed HTLC fees with the same arithmetic.
27f682a to
9591b47
Compare
Reject extreme fee rates that could produce incorrect transaction fees in static Loop In and Instant Loop Out. Static Loop In receives rates from the server; instant-out rates come from the local LND estimator. Previously, multiplication could wrap before fee validation, allowing malformed rates through and producing incorrect fees.
This PR has two commits:
utils.FeeForWeight, preserving rounding down and checking that the final fee fitsbtcutil.Amount.Validation:
make fmt, affected-package lint, commit-message lint, and added-line width checks pass.