Skip to content

Commit a880170

Browse files
committed
fix(bdk_esplora): use get_blocks_infos instead of get_blocks
1 parent dbddc79 commit a880170

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/esplora/src/async_ext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ async fn fetch_latest_blocks<S: Sleeper>(
184184
client: &esplora_client::AsyncClient<S>,
185185
) -> Result<BTreeMap<u32, BlockHash>, Error> {
186186
Ok(client
187-
.get_blocks(None)
187+
.get_block_infos(None)
188188
.await?
189189
.into_iter()
190-
.map(|b| (b.time.height, b.id))
190+
.map(|b| (b.height, b.id))
191191
.collect())
192192
}
193193

crates/esplora/src/blocking_ext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ fn fetch_latest_blocks(
170170
client: &esplora_client::BlockingClient,
171171
) -> Result<BTreeMap<u32, BlockHash>, Error> {
172172
Ok(client
173-
.get_blocks(None)?
173+
.get_block_infos(None)?
174174
.into_iter()
175-
.map(|b| (b.time.height, b.id))
175+
.map(|b| (b.height, b.id))
176176
.collect())
177177
}
178178

0 commit comments

Comments
 (0)