refactor(txpool/legacypool): remove ErrAlreadyKnown in legacypool #28400#2127
refactor(txpool/legacypool): remove ErrAlreadyKnown in legacypool #28400#2127gzliudan 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 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
This PR refactors the legacy transaction pool to stop defining its own ErrAlreadyKnown sentinel error and instead reuse the shared txpool.ErrAlreadyKnown error.
Changes:
- Removed
legacypool.ErrAlreadyKnownfromcore/txpool/legacypool/legacypool.go. - Updated code paths that reported “already known” to return/assign
txpool.ErrAlreadyKnown.
Comments suppressed due to low confidence (1)
core/txpool/legacypool/legacypool.go:66
- PR description says “deprecated ErrAlreadyKnown in legacypool”, but this change removes the exported identifier entirely (API breaking for any downstream imports of legacypool). If the intent is deprecation, keep a deprecated alias (e.g., ErrAlreadyKnown pointing to txpool.ErrAlreadyKnown) for a release or two; otherwise, please update the PR description / release notes to reflect that it’s removed.
var (
// ErrTxPoolOverflow is returned if the transaction pool is full and can't accept
// another remote transaction.
ErrTxPoolOverflow = errors.New("txpool is full")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bcbc8d4 to
e759473
Compare
Proposed changes
deprecated ErrAlreadyKnown in legacypool
Ref: ethereum#28400
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