bloom refactor (#7475)
* ethereum-types refactor in progress * ethereum-types refactor in progress * ethereum-types refactor in progress * ethereum-types refactor in progress * ethereum-types refactor finished * cleanup bloom mess * simplify usage of Bloom in few places * removed obsolete util/src/lib.rs * removed commented out code * ethereum-types 0.1.4 * updated ethereum-types and tiny-keccak
This commit is contained in:
@@ -20,9 +20,9 @@ use std::cmp;
|
||||
use std::cell::RefCell;
|
||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP, keccak};
|
||||
use heapsize::HeapSizeOf;
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use ethereum_types::{H256, U256, Address, Bloom};
|
||||
use bytes::Bytes;
|
||||
use basic_types::{LogBloom, ZERO_LOGBLOOM};
|
||||
use basic_types::{ZERO_LOGBLOOM};
|
||||
use time::get_time;
|
||||
use rlp::*;
|
||||
|
||||
@@ -59,7 +59,7 @@ pub struct Header {
|
||||
/// Block receipts root.
|
||||
receipts_root: H256,
|
||||
/// Block bloom.
|
||||
log_bloom: LogBloom,
|
||||
log_bloom: Bloom,
|
||||
/// Gas used for contracts execution.
|
||||
gas_used: U256,
|
||||
/// Block gas limit.
|
||||
@@ -146,7 +146,7 @@ impl Header {
|
||||
/// Get the receipts root field of the header.
|
||||
pub fn receipts_root(&self) -> &H256 { &self.receipts_root }
|
||||
/// Get the log bloom field of the header.
|
||||
pub fn log_bloom(&self) -> &LogBloom { &self.log_bloom }
|
||||
pub fn log_bloom(&self) -> &Bloom { &self.log_bloom }
|
||||
/// Get the transactions root field of the header.
|
||||
pub fn transactions_root(&self) -> &H256 { &self.transactions_root }
|
||||
/// Get the uncles hash field of the header.
|
||||
@@ -180,7 +180,7 @@ impl Header {
|
||||
/// Set the receipts root field of the header.
|
||||
pub fn set_receipts_root(&mut self, a: H256) { self.receipts_root = a; self.note_dirty() }
|
||||
/// Set the log bloom field of the header.
|
||||
pub fn set_log_bloom(&mut self, a: LogBloom) { self.log_bloom = a; self.note_dirty() }
|
||||
pub fn set_log_bloom(&mut self, a: Bloom) { self.log_bloom = a; self.note_dirty() }
|
||||
/// Set the timestamp field of the header.
|
||||
pub fn set_timestamp(&mut self, a: u64) { self.timestamp = a; self.note_dirty(); }
|
||||
/// Set the timestamp field of the header to the current time.
|
||||
|
||||
Reference in New Issue
Block a user