-
Notifications
You must be signed in to change notification settings - Fork 69
core/txpool: improve transaction validate #1921
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
base: dev-upgrade
Are you sure you want to change the base?
core/txpool: improve transaction validate #1921
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Pull request overview
This PR refactors the transaction validation logic in the txpool to simplify the handling of special transactions (transactions sent to BlockSignersBinary and RandomizeSMCBinary system contracts). The changes consolidate the special transaction check into an early-return block, making the code more readable.
Key Changes:
- Consolidated special transaction validation into a single early-return block
- Moved MinTip validation for regular transactions from the beginning to the end of the validation flow
- Simplified the conditional logic for checking gas tip requirements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f04eef9 to
50f4329
Compare
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
50f4329 to
9e3c0c2
Compare
Proposed changes
simplify validate special transaction
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that