File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,19 @@ mod test {
545
545
assert_eq ! ( tip_hash, tip_hash_async) ;
546
546
}
547
547
548
+ #[ cfg( all( feature = "blocking" , any( feature = "async" , feature = "async-https" ) ) ) ]
549
+ #[ tokio:: test]
550
+ async fn test_get_block_hash ( ) {
551
+ let ( blocking_client, async_client) = setup_clients ( ) . await ;
552
+
553
+ let block_hash = BITCOIND . client . get_block_hash ( 21 ) . unwrap ( ) ;
554
+
555
+ let block_hash_blocking = blocking_client. get_block_hash ( 21 ) . unwrap ( ) ;
556
+ let block_hash_async = async_client. get_block_hash ( 21 ) . await . unwrap ( ) ;
557
+ assert_eq ! ( block_hash, block_hash_blocking) ;
558
+ assert_eq ! ( block_hash, block_hash_async) ;
559
+ }
560
+
548
561
#[ cfg( all( feature = "blocking" , any( feature = "async" , feature = "async-https" ) ) ) ]
549
562
#[ tokio:: test]
550
563
async fn test_get_txid_at_block_index ( ) {
You can’t perform that action at this time.
0 commit comments