fix(core/txpool/legacypool): fix pricedList updates #32906#2218
fix(core/txpool/legacypool): fix pricedList updates #32906#2218AnilChinchawale merged 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)
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
Refactors the legacy txpool’s “future/queued” transaction handling into a dedicated queue type and updates the pool’s removal paths to keep pricedList stale counters consistent (ref ethereum#32906).
Changes:
- Introduces
core/txpool/legacypool/queue.goto encapsulate queued-tx bookkeeping (heartbeats, eviction, truncation, promotion). - Updates
LegacyPoolto use the newqueuetype and ensures bulk removals updatepool.priced.Removed(...)appropriately. - Adjusts
legacypool_test.goto use the new queue APIs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/txpool/legacypool/queue.go | New queue abstraction for queued tx lifecycle operations (evict/promote/truncate) with metric updates. |
| core/txpool/legacypool/legacypool.go | Migrates LegacyPool from map-based queue/beats to *queue and fixes pricedList removal accounting. |
| core/txpool/legacypool/legacypool_test.go | Updates tests to use queue.get() / queue.addresses() instead of direct map access. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f732b8a to
379968c
Compare
379968c to
523cab6
Compare
523cab6 to
6eb6224
Compare
Proposed changes
Ref: ethereum#32906
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