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

chain: Match for error code instead of text. #893

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

ziggie1984
Copy link
Contributor

@ziggie1984 ziggie1984 commented Oct 27, 2023

Fixes #892.

The return value of bitcoind did not change, bitcoind will return a different error if the txindex is not set (e.g. pruned nodes) so we check for the error code now instead of the specific text and include a direct reference of the bitcoind code.

@ziggie1984 ziggie1984 marked this pull request as ready for review October 27, 2023 11:12
chain/mempool.go Outdated Show resolved Hide resolved
The error needs to be less verbose to catch more cases where
bitcoind does not find the transaction in its mempool.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🦴

@Roasbeef Roasbeef merged commit 2795f3d into btcsuite:master Oct 27, 2023
3 checks passed
buck54321 pushed a commit to buck54321/btcwallet that referenced this pull request Apr 21, 2024
chain: Match for error code instead of text.
buck54321 pushed a commit to buck54321/btcwallet that referenced this pull request Apr 21, 2024
chain: Match for error code instead of text.
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.

NIT: Bitcoin 0.25 changed the error text so our matching fails now and spams the logs.
3 participants