From 4b3eaf565677b24303c7439c9972e0810979c445 Mon Sep 17 00:00:00 2001 From: Leonardo Lima Date: Tue, 24 Feb 2026 11:22:03 -0300 Subject: [PATCH] fix(bdk_esplora): use `get_blocks_infos` instead of `get_blocks` - bumps the `esplora-client` to `v0.12.3`. - use new `get_block_infos` instead of deprecated `get_blocks`. --- crates/esplora/Cargo.toml | 2 +- crates/esplora/src/async_ext.rs | 4 ++-- crates/esplora/src/blocking_ext.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/esplora/Cargo.toml b/crates/esplora/Cargo.toml index e4c553f77c..2fc2551a4f 100644 --- a/crates/esplora/Cargo.toml +++ b/crates/esplora/Cargo.toml @@ -16,7 +16,7 @@ workspace = true [dependencies] bdk_core = { path = "../core", version = "0.6.1", default-features = false } -esplora-client = { version = "0.12.1", default-features = false } +esplora-client = { version = "0.12.3", default-features = false } async-trait = { version = "0.1.66", optional = true } futures = { version = "0.3.26", optional = true } diff --git a/crates/esplora/src/async_ext.rs b/crates/esplora/src/async_ext.rs index c0e55ab507..7ba7d908c0 100644 --- a/crates/esplora/src/async_ext.rs +++ b/crates/esplora/src/async_ext.rs @@ -184,10 +184,10 @@ async fn fetch_latest_blocks( client: &esplora_client::AsyncClient, ) -> Result, Error> { Ok(client - .get_blocks(None) + .get_block_infos(None) .await? .into_iter() - .map(|b| (b.time.height, b.id)) + .map(|b| (b.height, b.id)) .collect()) } diff --git a/crates/esplora/src/blocking_ext.rs b/crates/esplora/src/blocking_ext.rs index 5a52b7a098..2cbfbb65db 100644 --- a/crates/esplora/src/blocking_ext.rs +++ b/crates/esplora/src/blocking_ext.rs @@ -170,9 +170,9 @@ fn fetch_latest_blocks( client: &esplora_client::BlockingClient, ) -> Result, Error> { Ok(client - .get_blocks(None)? + .get_block_infos(None)? .into_iter() - .map(|b| (b.time.height, b.id)) + .map(|b| (b.height, b.id)) .collect()) }