Skip to content

Commit

Permalink
fixes vectors test
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Oct 25, 2024
1 parent a48693c commit f17b449
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zebra-rpc/src/methods/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ async fn rpc_getblockheader() {

for hash_or_height in [HashOrHeight::from(height), hash.into()] {
let get_block_header = rpc
.get_block_header(hash_or_height.to_string(), None)
.get_block_header(hash_or_height.to_string(), Some(false))
.await
.expect("we should have a GetBlockHeader struct");
assert_eq!(get_block_header, expected_result);
Expand All @@ -431,6 +431,8 @@ async fn rpc_getblockheader() {
panic!("unexpected response to SaplingTree request")
};

let mut expected_nonce = *block.header.nonce;
expected_nonce.reverse();
let expected_result = GetBlockHeader::Object(Box::new(GetBlockHeaderObject {
hash: GetBlockHash(hash),
confirmations: 11 - i as i64,
Expand All @@ -441,7 +443,7 @@ async fn rpc_getblockheader() {
.expect("should always have sapling root")
.root(),
time: block.header.time.timestamp(),
nonce: *block.header.nonce,
nonce: expected_nonce,
bits: block.header.difficulty_threshold,
difficulty: block
.header
Expand Down

0 comments on commit f17b449

Please sign in to comment.