Skip to content

Commit 3f438e1

Browse files
committed
Merge #311: Backport #300 - Add utilities to test persistence
b642284 refactor: remove bdk_testenv dependency (codingp110) 7a5b644 docs: document persist_test_utils module (codingp110) 5d9a95c test: use utils to test file_store and rusqlite (codingp110) 79586e8 feat: add utilities to test persistence of wallet (codingp110) Pull request description: Backports #300 adding the `persist_test_utils` module to the `release/2.2` branch. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `just p` before pushing ACKs for top commit: oleonardolima: cACK b642284 notmandatory: ACK b642284 Tree-SHA512: ca482cb61ed9a9e98a18fa35ce534d969b26eb7f71141d66105362d64ba8e18c4664eb5e14e38f61e1c0750d801391a821706ba7141db65a317d9ac22b546316
2 parents d4642e0 + b642284 commit 3f438e1

File tree

4 files changed

+470
-1
lines changed

4 files changed

+470
-1
lines changed

wallet/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ bitcoin = { version = "0.32.6", features = [ "serde", "base64" ], default-featur
2222
serde = { version = "^1.0", features = ["derive"] }
2323
serde_json = { version = "^1.0" }
2424
bdk_chain = { version = "0.23.1", features = [ "miniscript", "serde" ], default-features = false }
25+
anyhow = { version = "1.0.98", optional = true }
26+
tempfile = { version = "3.20.0", optional = true }
2527

2628
# Optional dependencies
2729
bip39 = { version = "2.0", optional = true }
@@ -35,7 +37,7 @@ all-keys = ["keys-bip39"]
3537
keys-bip39 = ["bip39"]
3638
rusqlite = ["bdk_chain/rusqlite"]
3739
file_store = ["bdk_file_store"]
38-
test-utils = ["std"]
40+
test-utils = ["std", "anyhow", "tempfile"]
3941

4042
[dev-dependencies]
4143
assert_matches = "1.5.0"

wallet/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ pub mod keys;
3131
pub mod psbt;
3232
#[cfg(feature = "test-utils")]
3333
pub mod test_utils;
34+
35+
#[cfg(feature = "test-utils")]
36+
pub mod persist_test_utils;
37+
3438
mod types;
3539
mod wallet;
3640

0 commit comments

Comments
 (0)