Skip to content

Commit e010611

Browse files
committed
Test get_header_by_hash rather than get_height
1 parent 68b9d2b commit e010611

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,13 @@ mod test {
450450

451451
#[cfg(all(feature = "blocking", any(feature = "async", feature = "async-https")))]
452452
#[tokio::test]
453-
async fn test_get_header() {
453+
async fn test_get_header_by_hash() {
454454
let (blocking_client, async_client) = setup_clients().await;
455-
let block_header = blocking_client.get_header(53).unwrap();
456-
let block_header_async = async_client.get_header(53).await.unwrap();
455+
456+
let block_hash = BITCOIND.client.get_block_hash(23).unwrap();
457+
458+
let block_header = blocking_client.get_header_by_hash(&block_hash).unwrap();
459+
let block_header_async = async_client.get_header_by_hash(&block_hash).await.unwrap();
457460
assert_eq!(block_header, block_header_async);
458461
}
459462

0 commit comments

Comments
 (0)