Skip to content

Commit

Permalink
feat(btcio)!: BitcoinClient using jsonrpsee
Browse files Browse the repository at this point in the history
Replaced the reqwest::Client
  • Loading branch information
storopoli committed Aug 27, 2024
1 parent 2cfba73 commit 33e9e4e
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 244 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ num_enum = "0.7"
parking_lot = "0.12.3"
paste = "1.0"
rand = "0.8.5"
reqwest = { version = "0.12.4", features = ["json"] }
reth = { git = "https://github.com/alpenlabs/reth.git", rev = "dde184f56591d0af" }
reth-chainspec = { git = "https://github.com/alpenlabs/reth.git", rev = "dde184f56591d0af" }
reth-cli-commands = { git = "https://github.com/alpenlabs/reth.git", rev = "dde184f56591d0af" }
Expand Down
1 change: 0 additions & 1 deletion crates/btcio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["client"] }
jsonrpsee-types = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/btcio/src/reader/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async fn do_reader_task(
warn!(%cur_best_height, err = %err, "failed to poll Bitcoin client");
status_updates.push(StatusUpdate::RpcError(err.to_string()));

if let Some(err) = err.downcast_ref::<reqwest::Error>() {
if let Some(err) = err.downcast_ref::<RpcError>() {
// recoverable errors
if err.is_connect() {
status_updates.push(StatusUpdate::RpcConnected(false));
Expand Down
Loading

0 comments on commit 33e9e4e

Please sign in to comment.