Skip to content

Commit 629509d

Browse files
committed
feat: add utilities for testing persistence
Added the following functions to test if persistence of `bdk_chain` is happening correctly. - `persist_txgraph_changeset` - `persist_indexer_changeset` - `persist_local_chain_changeset` - `persist_last_seen`, `persist_last_evicted`, `persist_first_seen` - `persist_txouts` - `persist_txs` - `persist_anchors` - `persist_last_revealed` - `persist_spk_cache` Even though the first three tests cover every part of the `ChangeSet`s , the other tests are retained so as to help in unit testing.
1 parent 8d9df97 commit 629509d

File tree

3 files changed

+756
-2
lines changed

3 files changed

+756
-2
lines changed

crates/testenv/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ readme = "README.md"
1616
workspace = true
1717

1818
[dependencies]
19-
bdk_chain = { path = "../chain", version = "0.23.1", default-features = false }
19+
bdk_chain = { path = "../chain", version = "0.23.1", default-features = false, features = ["miniscript"]}
2020
electrsd = { version = "0.28.0", features = [ "legacy" ], default-features = false }
21+
anyhow = "1.0.98"
22+
tempfile = "3.20.0"
2123

2224
[dev-dependencies]
2325
bdk_testenv = { path = "." }
@@ -27,6 +29,5 @@ default = ["std", "download"]
2729
download = ["electrsd/bitcoind_25_0", "electrsd/esplora_a33e97e1"]
2830
std = ["bdk_chain/std"]
2931
serde = ["bdk_chain/serde"]
30-
3132
[package.metadata.docs.rs]
3233
no-default-features = true

crates/testenv/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
22

3+
pub mod persist_test_utils;
34
pub mod utils;
45

56
use bdk_chain::{

0 commit comments

Comments
 (0)