Show transaction hashes on merkle failure

Also show the block height and block hash.
This commit is contained in:
teor 2020-11-30 10:28:43 +10:00
parent f7baee77ff
commit 15be1b81cb
1 changed files with 12 additions and 1 deletions

View File

@ -126,7 +126,18 @@ mod tests {
for block_bytes in zebra_test::vectors::BLOCKS.iter() {
let block = Block::zcash_deserialize(&**block_bytes).unwrap();
let merkle_root = block.transactions.iter().collect::<Root>();
assert_eq!(merkle_root, block.header.merkle_root);
assert_eq!(
merkle_root,
block.header.merkle_root,
"block: {:?} {:?} transaction hashes: {:?}",
block.coinbase_height().unwrap(),
block.hash(),
block
.transactions
.iter()
.map(|tx| tx.hash())
.collect::<Vec<_>>()
);
}
}
}