test(chain): add block_id! utility macro

Co-authored-by: Wei Chen <wzc110@gmail.com>
This commit is contained in:
Daniela BrozzoniandWei Chen committed 2023-10-04 14:00:45 +02:00
1 parent 62de55f12d
commit 6e511473a5
1 file changed
+10
+10
View File
@@ -1,3 +1,13 @@
#[allow(unused_macros)]
macro_rules! block_id {
($height:expr, $hash:literal) => {{
bdk_chain::BlockId {
height: $height,
hash: bitcoin::hashes::Hash::hash($hash.as_bytes()),
}
}};
}
#[allow(unused_macros)]
macro_rules! h {
($index:literal) => {{