Skip to content

Commit 6e51147

Browse files
test(chain): add block_id! utility macro
Co-authored-by: Wei Chen <[email protected]>
1 parent 62de55f commit 6e51147

File tree

1 file changed

+10
-0
lines changed
  • crates/chain/tests/common

1 file changed

+10
-0
lines changed

crates/chain/tests/common/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#[allow(unused_macros)]
2+
macro_rules! block_id {
3+
($height:expr, $hash:literal) => {{
4+
bdk_chain::BlockId {
5+
height: $height,
6+
hash: bitcoin::hashes::Hash::hash($hash.as_bytes()),
7+
}
8+
}};
9+
}
10+
111
#[allow(unused_macros)]
212
macro_rules! h {
313
($index:literal) => {{

0 commit comments

Comments
 (0)