From: Leonardo Lima Date: Tue, 24 Feb 2026 14:22:03 +0000 (-0300) Subject: fix(bdk_esplora): use `get_blocks_infos` instead of `get_blocks` X-Git-Url: http://internal-gitweb-vhost/%22https:/parse/scripts/wallet/struct.CommandString.html?a=commitdiff_plain;h=a88017009b193d0f56dd0e6aac0efd8d31112e88;p=bdk fix(bdk_esplora): use `get_blocks_infos` instead of `get_blocks` --- diff --git a/crates/esplora/src/async_ext.rs b/crates/esplora/src/async_ext.rs index d504a472..0c2f8120 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 9413c14a..c1bcf29a 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()) }