Skip to content

Commit b642284

Browse files
110CodingPValuedMammal
authored andcommitted
refactor: remove bdk_testenv dependency
Otherwise ci fails
1 parent 7a5b644 commit b642284

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

wallet/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ serde_json = { version = "^1.0" }
2424
bdk_chain = { version = "0.23.1", features = [ "miniscript", "serde" ], default-features = false }
2525
anyhow = { version = "1.0.98", optional = true }
2626
tempfile = { version = "3.20.0", optional = true }
27-
bdk_testenv = { version = "0.13.0", optional = true}
2827

2928
# Optional dependencies
3029
bip39 = { version = "2.0", optional = true }
@@ -38,7 +37,7 @@ all-keys = ["keys-bip39"]
3837
keys-bip39 = ["bip39"]
3938
rusqlite = ["bdk_chain/rusqlite"]
4039
file_store = ["bdk_file_store"]
41-
test-utils = ["std", "anyhow", "tempfile", "bdk_testenv"]
40+
test-utils = ["std", "anyhow", "tempfile"]
4241

4342
[dev-dependencies]
4443
assert_matches = "1.5.0"

wallet/src/persist_test_utils.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,22 @@ use crate::{
1212
miniscript::descriptor::{Descriptor, DescriptorPublicKey},
1313
ChangeSet, WalletPersister,
1414
};
15-
use bdk_testenv::{block_id, hash};
15+
16+
macro_rules! block_id {
17+
($height:expr, $hash:literal) => {{
18+
bdk_chain::BlockId {
19+
height: $height,
20+
hash: bitcoin::hashes::Hash::hash($hash.as_bytes()),
21+
}
22+
}};
23+
}
24+
25+
macro_rules! hash {
26+
($index:literal) => {{
27+
bitcoin::hashes::Hash::hash($index.as_bytes())
28+
}};
29+
}
30+
1631
use std::fmt::Debug;
1732
use std::path::Path;
1833
use std::str::FromStr;

0 commit comments

Comments
 (0)