Skip to content

Commit b6d663b

Browse files
committed
Add integration test for get_block_hash()
1 parent a0f1aca commit b6d663b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,15 @@ mod test {
545545
assert_eq!(tip_hash, tip_hash_async);
546546
}
547547

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+
let block_hash = blocking_client.get_block_hash(21).unwrap();
553+
let block_hash_async = async_client.get_block_hash(21).await.unwrap();
554+
assert_eq!(block_hash, block_hash_async);
555+
}
556+
548557
#[cfg(all(feature = "blocking", any(feature = "async", feature = "async-https")))]
549558
#[tokio::test]
550559
async fn test_get_txid_at_block_index() {

0 commit comments

Comments
 (0)