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

rpcclient: update error str to match both versions #2205

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

yyforyongyu
Copy link
Collaborator

This commit updates the error str to match the same error returned from btcd for both pre-0.24.2 and post-0.24.2.

This commit updates the error str to match the same error returned from
`btcd` for both pre-0.24.2 and post-0.24.2.
@coveralls
Copy link

coveralls commented Jun 25, 2024

Pull Request Test Coverage Report for Build 9660242373

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.002%) to 57.249%

Files with Coverage Reduction New Missed Lines %
mempool/mempool.go 1 66.67%
connmgr/connmanager.go 3 86.27%
Totals Coverage Status
Change from base Build 9610935276: 0.002%
Covered Lines: 29803
Relevant Lines: 52059

💛 - Coveralls

Copy link
Member

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

@jcvernaleo jcvernaleo merged commit cc26860 into btcsuite:master Jun 25, 2024
3 checks passed
@yyforyongyu yyforyongyu deleted the fix-err-str branch June 25, 2024 14:48
@@ -411,7 +411,10 @@ var BtcdErrMap = map[string]error{
"transaction already exists in blockchain": ErrTxAlreadyConfirmed,

// A transaction in the mempool.
"already have transaction in mempool": ErrTxAlreadyInMempool,
//
// NOTE: For btcd v0.24.2 and beyond, the error message is "already
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be For btcd versions prior to v0.24.2, the error message is "already have transaction in mempool"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In v0.24 the error msg is already have transaction, in 0.24.2 the error msg is changed to already have transaction in mempool, otherwise the match won't fail since already have transaction is a subset of already have transaction in mempool.

Copy link
Contributor

@hieblmi hieblmi Jul 2, 2024

Choose a reason for hiding this comment

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

Thanks now it makes sense. I got confused cause the new code references the old message.

btcfind pushed a commit to btcfind/btcd that referenced this pull request Sep 26, 2024
This commit updates the error str to match the same error returned from
`btcd` for both pre-0.24.2 and post-0.24.2.
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.

5 participants