Skip to content
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

txpool/legacypool: deprecate already known error #2190

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

weiihann
Copy link
Contributor

Description

This PR deprecates the usage of ErrAlreadyKnown in the legacypool package. Existing dependencies on this error type should use txpool.ErrAlreadyKnown instead.

Rationale

Originally, upon triggering legacypool.ErrAlreadyKnown, this error will be propagated back to the initial caller functions.
For example, in this code, the expected behavior is that the metrics will be bumped if txpool.ErrAlreadyKnown function is used. However, legacypool.ErrAlreadyKnown and txpool.ErrAlreadyKnown are 2 different error types with the same error messages. Hence, the case of checking if the error is of txpool.ErrAlreadyKnown will not be triggered so it will go to the default case instead.

Copy link
Collaborator

@zzzckck zzzckck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zzzckck zzzckck merged commit 3761bf0 into bnb-chain:develop Jan 29, 2024
6 checks passed
weiihann added a commit to weiihann/bsc that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants