Skip to content

Commit d3c2b2a

Browse files
committed
[wip] chore(esplora): bump esplora-client to v0.13.0-prerelease
1 parent 023fdf0 commit d3c2b2a

5 files changed

Lines changed: 10 additions & 16 deletions

File tree

ci/pin-msrv.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ set -euo pipefail
99

1010
# cargo clean
1111
# rustup override set 1.85.0
12-
13-
cargo update -p idna_adapter --precise "1.2.1"
14-
cargo update -p icu_normalizer --precise "2.1.1"
15-
cargo update -p icu_provider --precise "2.1.1"
16-
cargo update -p icu_locale_core --precise "2.1.1"

crates/esplora/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ workspace = true
1717

1818
[dependencies]
1919
bdk_core = { path = "../core", version = "0.6.1", default-features = false }
20-
esplora-client = { version = "0.12.3", default-features = false }
20+
esplora-client = { git = "https://github.com/luisschwab/rust-esplora-client", branch = "more-api-fixes", default-features = false }
2121
async-trait = { version = "0.1.66", optional = true }
2222
futures = { version = "0.3.26", optional = true }
2323
serde_json = { version = "1.0", features = ["alloc"] }
2424

2525
[dev-dependencies]
26-
esplora-client = { version = "0.12.0" }
2726
bdk_chain = { path = "../chain" }
2827
bdk_testenv = { path = "../testenv" }
2928
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] }

crates/esplora/src/async_ext.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use bdk_core::{
77
bitcoin::{BlockHash, OutPoint, Txid},
88
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
99
};
10-
use esplora_client::Sleeper;
10+
use esplora_client::{EsploraTx, Sleeper};
1111
use futures::{stream::FuturesOrdered, TryStreamExt};
1212

1313
use crate::{insert_anchor_or_seen_at_from_status, insert_prevouts};
@@ -314,7 +314,7 @@ where
314314
I: Iterator<Item = Indexed<SpkWithExpectedTxids>> + Send,
315315
S: Sleeper + Clone + Send + Sync,
316316
{
317-
type TxsOfSpkIndex = (u32, Vec<esplora_client::Tx>, HashSet<Txid>);
317+
type TxsOfSpkIndex = (u32, Vec<EsploraTx>, HashSet<Txid>);
318318

319319
let mut update = TxUpdate::<ConfirmationBlockTime>::default();
320320
let mut last_active_index = Option::<u32>::None;
@@ -335,7 +335,7 @@ where
335335
let mut last_seen = None;
336336
let mut spk_txs = Vec::new();
337337
loop {
338-
let txs = client.scripthash_txs(&spk, last_seen).await?;
338+
let txs = client.get_scripthash_txs(&spk, last_seen).await?;
339339
let tx_count = txs.len();
340340
last_seen = txs.last().map(|tx| tx.txid);
341341
spk_txs.extend(txs);

crates/esplora/src/blocking_ext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use bdk_core::{
66
bitcoin::{BlockHash, OutPoint, Txid},
77
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
88
};
9-
use esplora_client::{OutputStatus, Tx};
9+
use esplora_client::{EsploraTx, OutputStatus};
1010
use std::thread::JoinHandle;
1111

1212
use crate::{insert_anchor_or_seen_at_from_status, insert_prevouts};
@@ -282,7 +282,7 @@ fn fetch_txs_with_keychain_spks<I: Iterator<Item = Indexed<SpkWithExpectedTxids>
282282
last_revealed: Option<u32>,
283283
parallel_requests: usize,
284284
) -> Result<(TxUpdate<ConfirmationBlockTime>, Option<u32>), Error> {
285-
type TxsOfSpkIndex = (u32, Vec<esplora_client::Tx>, HashSet<Txid>);
285+
type TxsOfSpkIndex = (u32, Vec<EsploraTx>, HashSet<Txid>);
286286

287287
let mut update = TxUpdate::<ConfirmationBlockTime>::default();
288288
let mut last_active_index = Option::<u32>::None;
@@ -303,7 +303,7 @@ fn fetch_txs_with_keychain_spks<I: Iterator<Item = Indexed<SpkWithExpectedTxids>
303303
let mut last_txid = None;
304304
let mut spk_txs = Vec::new();
305305
loop {
306-
let txs = client.scripthash_txs(&spk, last_txid)?;
306+
let txs = client.get_scripthash_txs(&spk, last_txid)?;
307307
let tx_count = txs.len();
308308
last_txid = txs.last().map(|tx| tx.txid);
309309
spk_txs.extend(txs);
@@ -414,7 +414,7 @@ fn fetch_txs_with_txids<I: IntoIterator<Item = Txid>>(
414414
.map(|t| (txid, t))
415415
})
416416
})
417-
.collect::<Vec<JoinHandle<Result<(Txid, Option<Tx>), Error>>>>();
417+
.collect::<Vec<JoinHandle<Result<(Txid, Option<EsploraTx>), Error>>>>();
418418

419419
if handles.is_empty() {
420420
break;

crates/esplora/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! [`esplora_client::AsyncClient`].
2222
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
2323

24-
use bdk_core::bitcoin::{Amount, OutPoint, TxOut, Txid};
24+
use bdk_core::bitcoin::{OutPoint, TxOut, Txid};
2525
use bdk_core::{BlockId, ConfirmationBlockTime, TxUpdate};
2626
use esplora_client::TxStatus;
2727

@@ -76,7 +76,7 @@ fn insert_prevouts(
7676
OutPoint::new(prev_txid, prev_vout),
7777
TxOut {
7878
script_pubkey: prev_txout.scriptpubkey,
79-
value: Amount::from_sat(prev_txout.value),
79+
value: prev_txout.value,
8080
},
8181
);
8282
}

0 commit comments

Comments
 (0)