Skip to content

Commit 06acb13

Browse files
committed
chore(deps): bump bdk-chain to 0.23.1
- updates the `bdk-chain` to `0.23.1` in `bdk_wallet`. - updates the `esplora`, `electrum` and `bitcoind_rpc` to latest version. - fix `test_spend_coinbase` by applying tx without a last_seen as it's a coinbase tx.
1 parent d0a0abc commit 06acb13

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

examples/example_wallet_electrum/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ edition = "2021"
55

66
[dependencies]
77
bdk_wallet = { path = "../../wallet", features = ["rusqlite"] }
8-
bdk_electrum = { version = "0.23.0" }
8+
bdk_electrum = { version = "0.23.1" }
99
anyhow = "1"

examples/example_wallet_esplora_async/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ edition = "2021"
77

88
[dependencies]
99
bdk_wallet = { path = "../../wallet", features = ["rusqlite"] }
10-
bdk_esplora = { version = "0.22.0", features = ["async-https", "tokio"] }
10+
bdk_esplora = { version = "0.22.1", features = ["async-https", "tokio"] }
1111
tokio = { version = "1.38.1", features = ["rt", "rt-multi-thread", "macros"] }
1212
anyhow = "1"

examples/example_wallet_esplora_blocking/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ publish = false
88

99
[dependencies]
1010
bdk_wallet = { path = "../../wallet", features = ["rusqlite"] }
11-
bdk_esplora = { version = "0.22.0", features = ["blocking"] }
11+
bdk_esplora = { version = "0.22.1", features = ["blocking"] }
1212
anyhow = "1"

examples/example_wallet_rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
bdk_wallet = { path = "../../wallet", features = ["rusqlite"] }
10-
bdk_bitcoind_rpc = { version = "0.20.0" }
10+
bdk_bitcoind_rpc = { version = "0.21.0" }
1111

1212
anyhow = "1"
1313
clap = { version = "4.5.17", features = ["derive", "env"] }

examples/example_wallet_rpc/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ fn main() -> anyhow::Result<()> {
174174
}
175175
Emission::Mempool(event) => {
176176
let start_apply_mempool = Instant::now();
177-
wallet.apply_evicted_txs(event.evicted_ats());
178-
wallet.apply_unconfirmed_txs(event.new_txs);
177+
wallet.apply_evicted_txs(event.evicted);
178+
wallet.apply_unconfirmed_txs(event.update);
179179
wallet.persist(&mut db)?;
180180
println!(
181181
"Applied unconfirmed transactions in {}s",

wallet/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ miniscript = { version = "12.3.1", features = [ "serde" ], default-features = fa
2121
bitcoin = { version = "0.32.6", features = [ "serde", "base64" ], default-features = false }
2222
serde = { version = "^1.0", features = ["derive"] }
2323
serde_json = { version = "^1.0" }
24-
bdk_chain = { version = "0.23.0", features = [ "miniscript", "serde" ], default-features = false }
24+
bdk_chain = { version = "0.23.1", features = [ "miniscript", "serde" ], default-features = false }
2525

2626
# Optional dependencies
2727
bip39 = { version = "2.0", optional = true }
28-
bdk_file_store = { version = "0.21.0", optional = true }
28+
bdk_file_store = { version = "0.21.1", optional = true }
2929

3030
[features]
3131
default = ["std"]
@@ -40,7 +40,7 @@ test-utils = ["std"]
4040
[dev-dependencies]
4141
assert_matches = "1.5.0"
4242
tempfile = "3"
43-
bdk_chain = { version = "0.23.0", features = ["rusqlite"] }
43+
bdk_chain = { version = "0.23.1", features = ["rusqlite"] }
4444
bdk_wallet = { path = ".", features = ["rusqlite", "file_store", "test-utils"] }
4545
anyhow = "1"
4646
rand = "^0.8"

wallet/tests/wallet.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,12 +2483,23 @@ fn test_spend_coinbase() {
24832483
}],
24842484
};
24852485
let txid = coinbase_tx.compute_txid();
2486-
insert_tx(&mut wallet, coinbase_tx);
2486+
24872487
let anchor = ConfirmationBlockTime {
24882488
block_id: confirmation_block_id,
24892489
confirmation_time: 30_000,
24902490
};
2491-
insert_anchor(&mut wallet, txid, anchor);
2491+
2492+
// Insert coinbase transaction into the local view, and also simulates confirming tx by applying
2493+
// the update with an `anchor`.
2494+
let mut tx_update = bdk_chain::TxUpdate::default();
2495+
tx_update.txs = vec![Arc::new(coinbase_tx)];
2496+
tx_update.anchors = [(anchor, txid)].into();
2497+
wallet
2498+
.apply_update(Update {
2499+
tx_update,
2500+
..Default::default()
2501+
})
2502+
.unwrap();
24922503

24932504
// NOTE: A transaction spending an output coming from the coinbase tx at height h, is eligible
24942505
// to be included in block h + [100 = COINBASE_MATURITY] or higher.

0 commit comments

Comments
 (0)