refactor(core/txpool): remove unused parameter local #30871#2171
refactor(core/txpool): remove unused parameter local #30871#2171gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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.
Pull request overview
This PR refactors the legacy txpool by removing an unused local parameter from LegacyPool.validateTx, simplifying the internal validation call path without changing external behavior.
Changes:
- Remove the
localparameter from(*LegacyPool).validateTx. - Update the internal call site in
(*LegacyPool).addto match the new signature.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // validateTx checks whether a transaction is valid according to the consensus | ||
| // rules and adheres to some heuristic limits of the local node (price and size). |
There was a problem hiding this comment.
The comment above validateTx still says it enforces local-node heuristic limits ("price and size"), but this helper now only performs state-dependent validation plus XDCZ/XDCX and auth checks (and no longer takes a local flag). Consider updating the comment to reflect what this function actually validates, and/or clarify that pricing/size checks happen in validateTxBasics.
| // validateTx checks whether a transaction is valid according to the consensus | |
| // rules and adheres to some heuristic limits of the local node (price and size). | |
| // validateTx performs state-dependent validation of a transaction against the | |
| // current pool state and consensus rules. It also enforces XDCZ/XDCX-specific | |
| // constraints and authentication checks. Pricing and size heuristics are enforced | |
| // earlier in validateTxBasics. |
4ca6f49 to
7bde639
Compare
Proposed changes
Ref: ethereum#30871
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
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