Skip to content

perf(standards): skip conversion math for 1/1 fee rates - #3317

Draft
mmagician wants to merge 1 commit into
nextfrom
mmagician-claude/fee-rate-early-return
Draft

perf(standards): skip conversion math for 1/1 fee rates#3317
mmagician wants to merge 1 commit into
nextfrom
mmagician-claude/fee-rate-early-return

Conversation

@mmagician

@mmagician mmagician commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

not ready - do not review yet

Summary

Addresses this review comment on #3298: a 1/1 conversion rate converts trivially, so fee::convert_amount now returns the amount unchanged without running the u64 multiply/divide chain. This is the common case for native fee payment (used by singlesig's trivial rate and, in the stacked PRs, by the network / no-auth wiring).

No behavior change; rate validation still runs first, so the zero/non-u32 rate errors are unaffected.

Per review: a 1/1 rate converts trivially, so convert_amount returns
the amount unchanged without the u64 multiply/divide chain. This is
the common case for native fee payment.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mmagician
mmagician force-pushed the mmagician-claude/fee-rate-early-return branch from 1b4a228 to 6288f7f Compare July 16, 2026 11:22
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.

2 participants