Refactor: update bdk-bitcoind-rpc to use bdk-bitcoind-client#2119
Draft
tvpeter wants to merge 2 commits intobitcoindevkit:masterfrom
Draft
Refactor: update bdk-bitcoind-rpc to use bdk-bitcoind-client#2119tvpeter wants to merge 2 commits intobitcoindevkit:masterfrom
tvpeter wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
- replace bitcoincore-rpc with bdk_bitcoind_client - update usage in lib.rs and bip158.rs modules
- Enable bitcoind-client v28_0 and set as default in bitcoind_rpc - Update example_bitcoind_rpc_polling to use bitcoind-client - Update tests to use bitcoind-client
This was referenced Feb 9, 2026
Collaborator
|
Concept ACK |
| [dependencies] | ||
| bitcoin = { version = "0.32.0", default-features = false } | ||
| bitcoincore-rpc = { version = "0.19.0" } | ||
| bdk-bitcoind-client ={ git = "https://github.com/bitcoindevkit/bdk-bitcoind-client", rev = "06526db5c25047b61d29f81b25cfee7bd0f3abc8"} |
Collaborator
There was a problem hiding this comment.
@tvpeter you can keep it referencing to master branch instead, while we don't have a release for bdk-bitcoind-client.
| default = ["std", "bitcoind_28_0"] | ||
| std = ["bitcoin/std", "bdk_core/std"] | ||
| serde = ["bitcoin/serde", "bdk_core/serde"] | ||
| bitcoind_28_0 =["bdk-bitcoind-client/28_0"] |
Collaborator
There was a problem hiding this comment.
nit: we should probably establish a policy here similar to bdk-bitcoind-rcp ones, that it support the latest 3 versions (exposed as features too).
Comment on lines
+369
to
389
| /// Extends [`bdk_bitcoind_client::Error`]. | ||
| pub trait BitcoindRpcErrorExt { | ||
| /// Returns whether the error is a "not found" error. | ||
| /// | ||
| /// This is useful since [`Emitter`] emits [`Result<_, bitcoincore_rpc::Error>`]s as | ||
| /// This is useful since [`Emitter`] emits [`Result<_, bdk_bitcoind_client::Error>`]s as | ||
| /// [`Iterator::Item`]. | ||
| fn is_not_found_error(&self) -> bool; | ||
| } | ||
|
|
||
| impl BitcoindRpcErrorExt for bitcoincore_rpc::Error { | ||
| impl BitcoindRpcErrorExt for bdk_bitcoind_client::Error { | ||
| fn is_not_found_error(&self) -> bool { | ||
| if let bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::Error::Rpc(rpc_err)) = self | ||
| if let bdk_bitcoind_client::Error::JsonRpc(bdk_bitcoind_client::jsonrpc::Error::Rpc( | ||
| rpc_err, | ||
| )) = self | ||
| { | ||
| rpc_err.code == -5 | ||
| } else { | ||
| false | ||
| } | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
@tvpeter can't we have this in bdk_bitcoind_client instead ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR replaces
bitcoincore-rpcwithbdk-bitcoind-clientinbdk-bitcoind-rpclibrary and its tests and examples.Depends on bdk-bitcoind-client#5
Notes to the reviewers
Changelog notice
bitcoincore-rpcwithbdk-bitcoind-clientChecklists
All Submissions: