mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:08:38 +00:00
policy: Document rounding behavior of feerate fee getters #36741
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36741
Loading…
Reference in a new issue
No description provided.
Delete branch "2611-doc-policy-feerate-fee-get"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now that the impl moved into the C++ file in
38ece2a9c8, it could make sense to document the rounding behavior in the header file doxygen comment.Also, drop the "special case", which seems more confusing than helpful. (It is only a special case for negative feerates, which are mostly irrelevant and only possible with manual fee prioritization deltas)
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
CAmounta class by hodlinator)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
🔵 Suggestion · Getter comments leave signed rounding directions implicit
The comments use correct ceiling/floor terminology, but spelling out the infinity directions would make the negative-feerate behavior clearer.
Location:
src/policy/feerate.h:59(head).Review coverage was incomplete.
Reviewed:
fa3d4f099282· Full review report · Previous reportspermalink
(made the feefrac fuzz test stricter, thx Ralph review)
cr ACK
fa9aab2a29Left one nit and a test suggestion (built and ran
amount_testslocally with it).nit: now that the special case is gone, the temporary isn't needed (and this matches
GetFeePerKabove):The new "(Rounds down)" doc on
GetFeePerKisn't covered by a test with a fractional rate (all existing ones are exact per kvB). Maybe we can add something like the following (which also pins the 1-sat gap between the two getters):thx, done
ACK
fa3d4f0992The documentation change is clean :)
Tried to see why we were returning -1 before and I couldn't fine any specific reason for it. Seems good to remove the exception.
I guess this is worth to be mentioned in the commit message, just in case in the future someone checks this commits without context.
It is the function immediately above, so I think I'll leave as-is for now :)
re-ACK
fa3d4f0992ACK
fa3d4f0992