-
Couldn't load subscription status.
- Fork 242
fix: use gas price at mempool priority instead of fee amount #408
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
Conversation
📝 WalkthroughWalkthroughThe code updates the calculation of transaction priority in the mempool by basing it on gas price rather than total fee amount. Corresponding tests are updated to assert the correct priority values under different transaction contexts, ensuring the new logic is validated. Changes
Sequence Diagram(s)sequenceDiagram
participant Tx as Transaction
participant FeeChecker as MempoolFeeChecker
Tx->>FeeChecker: Submit transaction (with fee, gas)
FeeChecker->>FeeChecker: Calculate gas price from total fee
FeeChecker->>FeeChecker: Set priority = max(gas price × 1,000,000, 1)
FeeChecker-->>Tx: Return priority and error (if any)
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #408 +/- ##
=======================================
Coverage 40.15% 40.15%
=======================================
Files 295 295
Lines 27726 27726
=======================================
Hits 11132 11132
Misses 14883 14883
Partials 1711 1711
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Closes: #407
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!in the type prefix if API or client breaking changeReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...