From 44f287df02d1fd2a5ec1be9c579a96bb2c89e67e Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 7 Dec 2015 17:20:46 +0100 Subject: [PATCH 1/2] Remove Bytes type from here. --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index df2e7c528..b1668c6ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ extern crate ethcore_util; use ethcore_util::hash::*; use ethcore_util::uint::*; -pub type Bytes = Vec; pub type LogBloom = Hash4096; pub static ZERO_ADDRESS: Address = Address([0x00; 20]); From 9c6279b8aae690b18821f503aa8c89fbda79276e Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 13 Dec 2015 17:47:38 +0100 Subject: [PATCH 2/2] updated BlockView --- src/blockheader.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blockheader.rs b/src/blockheader.rs index 12844df65..c57171f65 100644 --- a/src/blockheader.rs +++ b/src/blockheader.rs @@ -24,7 +24,7 @@ impl<'a> BlockView<'a> { pub fn parent_hash(&self) -> H256 { self.rlp.val_at(0) } pub fn uncles_hash(&self) -> H256 { self.rlp.val_at(1) } - pub fn coinbase(&self) -> Address { self.rlp.val_at(2) } + pub fn author(&self) -> Address { self.rlp.val_at(2) } pub fn state_root(&self) -> H256 { self.rlp.val_at(3) } pub fn transactions_root(&self) -> H256 { self.rlp.val_at(4) } pub fn receipts_root(&self) -> H256 { self.rlp.val_at(5) } @@ -32,10 +32,10 @@ impl<'a> BlockView<'a> { pub fn difficulty(&self) -> U256 { self.rlp.val_at(7) } pub fn number(&self) -> U256 { self.rlp.val_at(8) } pub fn gas_limit(&self) -> U256 { self.rlp.val_at(9) } - pub fn gas_usd(&self) -> U256 { self.rlp.val_at(10) } + pub fn gas_used(&self) -> U256 { self.rlp.val_at(10) } pub fn timestamp(&self) -> U256 { self.rlp.val_at(11) } - pub fn mix_hash(&self) -> H256 { self.rlp.val_at(12) } - pub fn nonce(&self) -> H64 { self.rlp.val_at(13) } + pub fn extra_data(&self) -> Bytes { self.rlp.val_at(12) } + pub fn seal(&self) -> Vec { self.rlp.val_at(13) } } impl<'a> sha3::Hashable for BlockView<'a> {