-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
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.
Pull Request Test Coverage Report for Build 9660242373Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
@@ -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 |
There was a problem hiding this comment.
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"
?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
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.