test(chain): add block_id! utility macro
Co-authored-by: Wei Chen <wzc110@gmail.com>
This commit is contained in:
parent
62de55f12d
commit
6e511473a5
@ -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)]
|
#[allow(unused_macros)]
|
||||||
macro_rules! h {
|
macro_rules! h {
|
||||||
($index:literal) => {{
|
($index:literal) => {{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user