From 5ae2aef3693f3ff313dfc2b924ef5e8b174b04a3 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Thu, 28 Jan 2016 20:26:32 +0400 Subject: [PATCH] zeroes --- src/tests/helpers.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/tests/helpers.rs b/src/tests/helpers.rs index 4a37b3d41..1c1b1829d 100644 --- a/src/tests/helpers.rs +++ b/src/tests/helpers.rs @@ -64,7 +64,7 @@ fn create_unverifiable_block_header(order: u32, parent_hash: H256) -> Header { header.timestamp = (order * 10) as u64; header.number = order as u64; header.parent_hash = parent_hash; - header.state_root = H256::from_str("0000000000000000000000000000000000000000000000000000000000000000").unwrap(); + header.state_root = H256::zero(); header } @@ -145,12 +145,7 @@ pub fn get_test_client_with_blocks(blocks: Vec) -> GuardedTempResult GuardedTempResult { let temp = RandomTempPath::new(); - let bc = BlockChain::new( - &create_unverifiable_block( - 0, - H256::zero()), - temp.as_path()); - + let bc = BlockChain::new(&create_unverifiable_block(0, H256::zero()), temp.as_path()); for block_order in 1..block_number { bc.insert_block(&create_unverifiable_block(block_order, bc.best_block_hash())); } @@ -163,12 +158,7 @@ pub fn generate_dummy_blockchain(block_number: u32) -> GuardedTempResult GuardedTempResult { let temp = RandomTempPath::new(); - let bc = BlockChain::new( - &create_unverifiable_block( - 0, - H256::from_str("0000000000000000000000000000000000000000000000000000000000000000").unwrap()), - temp.as_path()); - + let bc = BlockChain::new(&create_unverifiable_block(0, H256::zero()), temp.as_path()); for block_order in 1..block_number { bc.insert_block(&create_unverifiable_block_with_extra(block_order, bc.best_block_hash(), None)); }