Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ serde = { version = "1", features = ["derive"] }

# Optional dependencies
anyhow = { version = "1.0.98", optional = true }
bdk_file_store = { version = "0.21.1", optional = true }
bdk_file_store = { version = "0.22.0", optional = true }
bip39 = { version = "2.0", optional = true }
tempfile = { version = "3.20.0", optional = true }

Expand All @@ -43,7 +43,7 @@ test-utils = ["std", "anyhow", "tempfile"]
[dev-dependencies]
anyhow = "1"
assert_matches = "1.5.0"
bdk_bitcoind_rpc = { version = "0.21.0" }
bdk_bitcoind_rpc = { version = "0.22.0" }
bdk_electrum = { version = "0.23.1" }
bdk_esplora = { version = "0.22.1", features = ["async-https", "blocking-https", "tokio"] }
bdk_wallet = { path = ".", features = ["rusqlite", "file_store", "test-utils"] }
Expand Down Expand Up @@ -74,3 +74,28 @@ name = "esplora_blocking"

[[example]]
name = "bitcoind_rpc"


[patch.crates-io.bdk_chain]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"

[patch.crates-io.bdk_core]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"

[patch.crates-io.bdk_bitcoind_rpc]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"

[patch.crates-io.bdk_electrum]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"

[patch.crates-io.bdk_esplora]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"

[patch.crates-io.bdk_file_store]
git = "https://github.com/bitcoindevkit/bdk"
branch = "master"
3 changes: 2 additions & 1 deletion examples/bitcoind_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ fn main() -> anyhow::Result<()> {
args.start_height,
wallet
.transactions()
.filter(|tx| tx.chain_position.is_unconfirmed()),
.filter(|tx| tx.pos.is_unconfirmed())
.map(|tx| tx.tx),
);
spawn(move || -> Result<(), anyhow::Error> {
while let Some(emission) = emitter.next_block()? {
Expand Down
2 changes: 1 addition & 1 deletion src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ pub fn receive_output_to_address(
/// a different one at the same height, then all later blocks are evicted as well.
pub fn insert_checkpoint(wallet: &mut Wallet, block: BlockId) {
let mut cp = wallet.latest_checkpoint();
cp = cp.insert(block);
cp = cp.insert(block.height, block.hash);
wallet
.apply_update(Update {
chain: Some(cp),
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl FullyNodedExport {
let blockheight = if include_blockheight {
wallet.transactions().next().map_or(0, |canonical_tx| {
canonical_tx
.chain_position
.pos
.confirmation_height_upper_bound()
.unwrap_or(0)
})
Expand Down
Loading