From 1a3e8fdb3b0ea579a0c17584b3589f34cf2bb316 Mon Sep 17 00:00:00 2001 From: debris Date: Sat, 5 Dec 2015 17:32:36 +0100 Subject: [PATCH] ethcore compiling with latest util --- src/lib.rs | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index df2e7c528..9c3fa2626 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,25 +5,25 @@ use ethcore_util::hash::*; use ethcore_util::uint::*; pub type Bytes = Vec; -pub type LogBloom = Hash4096; +pub type LogBloom = H2048; pub static ZERO_ADDRESS: Address = Address([0x00; 20]); -pub static ZERO_HASH256: Hash256 = Hash256([0x00; 32]); -pub static ZERO_LOGBLOOM: LogBloom = Hash4096([0x00; 512]); +pub static ZERO_H256: H256 = H256([0x00; 32]); +pub static ZERO_LOGBLOOM: LogBloom = H2048([0x00; 256]); #[derive(Debug)] pub struct Header { - parent_hash: Hash256, + parent_hash: H256, timestamp: U256, number: U256, author: Address, - transactions_root: Hash256, - uncles_hash: Hash256, - extra_data_hash: Hash256, + transactions_root: H256, + uncles_hash: H256, + extra_data_hash: H256, - state_root: Hash256, - receipts_root: Hash256, + state_root: H256, + receipts_root: H256, log_bloom: LogBloom, gas_used: U256, gas_limit: U256, @@ -35,22 +35,22 @@ pub struct Header { impl Header { pub fn new() -> Header { Header { - parent_hash: ZERO_HASH256, - timestamp: BAD_U256, - number: ZERO_U256, - author: ZERO_ADDRESS, + parent_hash: ZERO_H256.clone(), + timestamp: BAD_U256.clone(), + number: ZERO_U256.clone(), + author: ZERO_ADDRESS.clone(), - transactions_root: ZERO_HASH256, - uncles_hash: ZERO_HASH256, - extra_data_hash: ZERO_HASH256, + transactions_root: ZERO_H256.clone(), + uncles_hash: ZERO_H256.clone(), + extra_data_hash: ZERO_H256.clone(), - state_root: ZERO_HASH256, - receipts_root: ZERO_HASH256, - log_bloom: ZERO_LOGBLOOM, - gas_used: ZERO_U256, - gas_limit: ZERO_U256, + state_root: ZERO_H256.clone(), + receipts_root: ZERO_H256.clone(), + log_bloom: ZERO_LOGBLOOM.clone(), + gas_used: ZERO_U256.clone(), + gas_limit: ZERO_U256.clone(), - difficulty: ZERO_U256, + difficulty: ZERO_U256.clone(), seal: vec![], } }