From 3748623d92721f683e8391ca3b40f4a633db114b Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 28 Oct 2020 22:12:39 +1000 Subject: [PATCH] Remove a redundant block header test vector --- zebra-consensus/src/block/tests.rs | 9 ++------- zebra-test/src/vectors.rs | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/zebra-consensus/src/block/tests.rs b/zebra-consensus/src/block/tests.rs index 9f64bfb27..3170a2db2 100644 --- a/zebra-consensus/src/block/tests.rs +++ b/zebra-consensus/src/block/tests.rs @@ -360,12 +360,7 @@ fn founders_reward_validation_failure() -> Result<(), Report> { let network = Network::Mainnet; - // Get a header from a block in the mainnet that is inside the founders reward period. - let header = - block::Header::zcash_deserialize(&zebra_test::vectors::HEADER_MAINNET_415000_BYTES[..]) - .unwrap(); - - // From the same block get the coinbase transaction + // Get a block in the mainnet that is inside the founders reward period. let block = Arc::::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..]) .expect("block should deserialize"); @@ -387,7 +382,7 @@ fn founders_reward_validation_failure() -> Result<(), Report> { let mut transactions: Vec> = Vec::new(); transactions.push(Arc::new(tx)); let block = Block { - header, + header: block.header, transactions, }; diff --git a/zebra-test/src/vectors.rs b/zebra-test/src/vectors.rs index 79d434caa..d18a93299 100644 --- a/zebra-test/src/vectors.rs +++ b/zebra-test/src/vectors.rs @@ -137,8 +137,6 @@ pub const GENERIC_TESTNET_TX: [u8; 2005] = [ ]; lazy_static! { - pub static ref HEADER_MAINNET_415000_BYTES: &'static [u8] = &BLOCK_MAINNET_415000_BYTES[..1487]; - pub static ref DUMMY_HEADER: Vec = >::from_hex("040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003d000000000000000000000000000000000000000000000000000000000000000000000000000000fd4005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") .expect("Header bytes are in valid hex representation");