Skip to content

Commit

Permalink
add more checks to test
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Oct 25, 2023
1 parent 25e205b commit 550681e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zebra-scanner/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async fn scanning_from_fake_generated_blocks() -> Result<()> {

let res = scan_block(
&zcash_primitives::consensus::MainNetwork,
cb,
cb.clone(),
&vks[..],
&[(account, nf)],
None,
Expand All @@ -157,6 +157,11 @@ async fn scanning_from_fake_generated_blocks() -> Result<()> {

// The response should have one transaction relevant to the key we provided.
assert_eq!(res.transactions().len(), 1);
// The transaction should be the one we provided, second one in the block.
// (random transaction is added before ours in `fake_compact_block` function)
assert_eq!(res.transactions()[0].txid, cb.vtx[1].txid());
// The block hash of the response should be the same as the one provided.
assert_eq!(res.block_hash(), cb.hash());

Ok(())
}
Expand Down

0 comments on commit 550681e

Please sign in to comment.