Test coinbase is first for all block test vectors

This commit is contained in:
teor 2020-10-13 08:35:39 +10:00
parent 7ce3e2e43a
commit 54efea96cd
1 changed files with 16 additions and 0 deletions

View File

@ -129,6 +129,22 @@ async fn check_transcripts() -> Result<(), Report> {
Ok(())
}
#[test]
fn coinbase_is_first_for_historical_blocks() -> Result<(), Report> {
let block_iter = zebra_test::vectors::BLOCKS.iter();
for block in block_iter {
let block = block
.zcash_deserialize_into::<Block>()
.expect("block is structurally valid");
check::coinbase_is_first(&block)
.expect("the coinbase in a historical block should be valid");
}
Ok(())
}
#[test]
fn equihash_is_valid_for_historical_blocks() -> Result<(), Report> {
let block_iter = zebra_test::vectors::BLOCKS.iter();