Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed Nov 13, 2024
1 parent 66f4dab commit de1b3a6
Showing 1 changed file with 0 additions and 70 deletions.
70 changes: 0 additions & 70 deletions zebra-rpc/src/methods/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,76 +156,6 @@ async fn rpc_getblock() {
let orchard = OrchardTrees { size: 0 };
let trees = GetBlockTrees { sapling, orchard };

// Make height calls with verbosity=3 and check response
for (i, block) in blocks.iter().enumerate() {
let get_block = rpc
.get_block(i.to_string(), Some(3u8))
.await
.expect("We should have a GetBlock struct");

assert_eq!(
get_block,
GetBlock::Object {
hash: GetBlockHash(block.hash()),
confirmations: (blocks.len() - i).try_into().expect("valid i64"),
height: Some(Height(i.try_into().expect("valid u32"))),
time: None,
tx: block
.transactions
.iter()
.map(|tx| tx.hash().encode_hex())
.collect(),
trees,
size: None,
version: None,
merkle_root: None,
final_sapling_root: None,
final_orchard_root: None,
nonce: None,
solution: None,
bits: None,
difficulty: None,
previous_block_hash: None,
next_block_hash: None
}
);
}

// Make hash calls with verbosity=3 and check response
for (i, block) in blocks.iter().enumerate() {
let get_block = rpc
.get_block(blocks[i].hash().to_string(), Some(3u8))
.await
.expect("We should have a GetBlock struct");

assert_eq!(
get_block,
GetBlock::Object {
hash: GetBlockHash(block.hash()),
confirmations: (blocks.len() - i).try_into().expect("valid i64"),
height: None,
time: None,
tx: block
.transactions
.iter()
.map(|tx| tx.hash().encode_hex())
.collect(),
trees,
size: None,
version: None,
merkle_root: None,
final_sapling_root: None,
final_orchard_root: None,
nonce: None,
solution: None,
bits: None,
difficulty: None,
previous_block_hash: None,
next_block_hash: None
}
);
}

// Make height calls with verbosity=1 and check response
for (i, block) in blocks.iter().enumerate() {
let get_block = rpc
Expand Down

0 comments on commit de1b3a6

Please sign in to comment.