Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Remove reexport of HeapSizeOf in util (#6419)
Browse files Browse the repository at this point in the history
  • Loading branch information
axelchalon authored and tomusdrw committed Aug 30, 2017
1 parent f7e15f2 commit 6b5ad69
Show file tree
Hide file tree
Showing 35 changed files with 51 additions and 20 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ethstore = { path = "../ethstore" }
evm = { path = "evm" }
futures = "0.1"
hardware-wallet = { path = "../hw" }
heapsize = "0.4"
hyper = { git = "https://github.com/paritytech/hyper", default-features = false }
itertools = "0.5"
lazy_static = "0.2"
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ common-types = { path = "../types" }
ethcore-util = { path = "../../util" }
evmjit = { path = "../../evmjit", optional = true }
ethjson = { path = "../../json" }
heapsize = "0.4"
lazy_static = "0.2"
log = "0.3"
rlp = { path = "../../util/rlp" }
Expand Down
3 changes: 2 additions & 1 deletion ethcore/evm/src/interpreter/shared_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use std::sync::Arc;
use util::{H256, HeapSizeOf, Mutex};
use heapsize::HeapSizeOf;
use util::{H256, Mutex};
use util::sha3::*;
use util::cache::MemoryLruCache;
use bit_set::BitSet;
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern crate rlp;
extern crate parity_wasm;
extern crate wasm_utils;
extern crate ethcore_logger;
extern crate heapsize;
extern crate vm;

#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ethcore-io = { path = "../../util/io" }
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
ethcore-devtools = { path = "../../devtools" }
evm = { path = "../evm" }
heapsize = "0.4"
vm = { path = "../vm" }
rlp = { path = "../../util/rlp" }
rlp_derive = { path = "../../util/rlp_derive" }
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use ethcore::receipt::Receipt;

use stats::Corpus;
use time::{SteadyTime, Duration};
use util::{U256, H256, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{U256, H256};
use util::cache::MemoryLruCache;

/// Configuration for how much data to cache.
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/client/header_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ use ethcore::header::Header;
use ethcore::ids::BlockId;

use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
use util::{H256, U256, HeapSizeOf, RwLock};
use heapsize::HeapSizeOf;
use util::{H256, U256, RwLock};
use util::kvdb::{DBTransaction, KeyValueDB};

use cache::Cache;
Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl Client {

/// Get blockchain mem usage in bytes.
pub fn chain_mem_used(&self) -> usize {
use util::HeapSizeOf;
use heapsize::HeapSizeOf;

self.chain.heap_size_of_children()
}
Expand Down
1 change: 1 addition & 0 deletions ethcore/light/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ extern crate ethcore_network as network;
extern crate ethcore_util as util;
extern crate ethcore;
extern crate evm;
extern crate heapsize;
extern crate futures;
extern crate itertools;
extern crate rand;
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use std::sync::Arc;
use std::mem;
use itertools::Itertools;
use bloomchain as bc;
use heapsize::HeapSizeOf;
use util::*;
use rlp::*;
use header::*;
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/blockchain/extras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use engines::epoch::{Transition as EpochTransition};
use header::BlockNumber;
use receipt::Receipt;

use util::{HeapSizeOf, H256, H264, U256};
use heapsize::HeapSizeOf;
use util::{H256, H264, U256};
use util::kvdb::PREFIX_LEN as DB_PREFIX_LEN;

/// Represents index of extra data in database
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/blooms/bloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use bloomchain as bc;
use util::HeapSizeOf;
use heapsize::HeapSizeOf;
use basic_types::LogBloom;

/// Helper structure representing bloom of the trace.
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/blooms/bloom_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use bloomchain::group as bc;
use rlp::*;
use util::HeapSizeOf;
use heapsize::HeapSizeOf;
use super::Bloom;

/// Represents group of X consecutive blooms.
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/blooms/group_position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use bloomchain::group as bc;
use util::HeapSizeOf;
use heapsize::HeapSizeOf;

/// Represents `BloomGroup` position in database.
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/encoded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use header::{BlockNumber, Header as FullHeader};
use transaction::UnverifiedTransaction;
use views;

use util::{Address, Hashable, H256, H2048, U256, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{Address, Hashable, H256, H2048, U256};
use rlp::Rlp;

/// Owning header view.
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/engines/validator_set/simple_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

/// Preconfigured validator list.
use util::{H256, Address, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{H256, Address};

use engines::{Call, Engine};
use header::{BlockNumber, Header};
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/engines/validator_set/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
use std::str::FromStr;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
use util::{Bytes, H256, Address, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{Bytes, H256, Address};

use engines::{Call, Engine};
use header::{Header, BlockNumber};
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use std::cmp;
use std::cell::RefCell;
use heapsize::HeapSizeOf;
use util::*;
use basic_types::{LogBloom, ZERO_LOGBLOOM};
use time::get_time;
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ extern crate num;
extern crate price_info;
extern crate rand;
extern crate rlp;
extern crate heapsize;

#[macro_use]
extern crate rlp_derive;
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/miner/transaction_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ use std::cmp::Ordering;
use std::cmp;
use std::collections::{HashSet, HashMap, BTreeSet, BTreeMap};
use linked_hash_map::LinkedHashMap;
use util::{Address, H256, U256, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{Address, H256, U256};
use table::Table;
use transaction::*;
use error::{Error, TransactionError};
Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/trace/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ use std::collections::{HashMap, VecDeque};
use std::sync::Arc;
use bloomchain::{Number, Config as BloomConfig};
use bloomchain::group::{BloomGroupDatabase, BloomGroupChain, GroupPosition, BloomGroup};
use util::{H256, H264, KeyValueDB, DBTransaction, RwLock, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{H256, H264, KeyValueDB, DBTransaction, RwLock};
use header::BlockNumber;
use trace::{LocalizedTrace, Config, Filter, Database as TraceDatabase, ImportRequest, DatabaseExtras};
use db::{self, Key, Writable, Readable, CacheUpdatePolicy};
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/trace/types/flat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use std::collections::VecDeque;
use rlp::*;
use util::HeapSizeOf;
use heapsize::HeapSizeOf;
use basic_types::LogBloom;
use super::trace::{Action, Res};

Expand Down
3 changes: 2 additions & 1 deletion ethcore/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
use std::ops::Deref;
use rlp::*;
use util::sha3::Hashable;
use util::{H256, Address, U256, Bytes, HeapSizeOf};
use heapsize::HeapSizeOf;
use util::{H256, Address, U256, Bytes};
use ethkey::{Signature, Secret, Public, recover, public_to_address, Error as EthkeyError};
use error::*;
use evm::Schedule;
Expand Down
6 changes: 4 additions & 2 deletions ethcore/src/verification/queue/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
use engines::Engine;
use error::Error;

use util::{HeapSizeOf, H256, U256};
use heapsize::HeapSizeOf;
use util::{H256, U256};

pub use self::blocks::Blocks;
pub use self::headers::Headers;
Expand Down Expand Up @@ -72,7 +73,8 @@ pub mod blocks {
use header::Header;
use verification::{PreverifiedBlock, verify_block_basic, verify_block_unordered};

use util::{Bytes, HeapSizeOf, H256, U256};
use heapsize::HeapSizeOf;
use util::{Bytes, H256, U256};

/// A mode for verifying blocks.
pub struct Blocks;
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/verification/queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering as AtomicOrdering};
use std::sync::{Condvar as SCondvar, Mutex as SMutex, Arc};
use std::cmp;
use std::collections::{VecDeque, HashSet, HashMap};
use heapsize::HeapSizeOf;
use util::*;
use io::*;
use error::*;
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/verification/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//! 3. Final verification against the blockchain done before enactment.
use std::collections::HashSet;
use heapsize::HeapSizeOf;
use util::*;
use engines::Engine;
use error::{BlockError, Error};
Expand Down
1 change: 1 addition & 0 deletions ethcore/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rlp_derive = { path = "../../util/rlp_derive" }
ethcore-util = { path = "../../util" }
ethjson = { path = "../../json" }
bloomable = { path = "../../util/bloomable" }
heapsize = "0.4"

[dev-dependencies]
rustc-hex= "1.0"
1 change: 1 addition & 0 deletions ethcore/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern crate rlp;
#[macro_use]
extern crate rlp_derive;
extern crate bloomable;
extern crate heapsize;

#[cfg(test)]
extern crate rustc_hex;
Expand Down
3 changes: 2 additions & 1 deletion ethcore/types/src/log_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
//! Log entry type definition.
use std::ops::Deref;
use util::{H256, Address, Bytes, HeapSizeOf, Hashable};
use heapsize::HeapSizeOf;
use util::{H256, Address, Bytes, Hashable};
use bloomable::Bloomable;

use {BlockNumber};
Expand Down
2 changes: 1 addition & 1 deletion ethcore/types/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! Receipt
use util::{H256, U256, Address};
use util::HeapSizeOf;
use heapsize::HeapSizeOf;
use rlp::*;

use {BlockNumber};
Expand Down
1 change: 1 addition & 0 deletions sync/src/block_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use std::collections::{HashSet, VecDeque};
use std::cmp;
use heapsize::HeapSizeOf;
use util::*;
use rlp::*;
use ethcore::views::{BlockView};
Expand Down
1 change: 1 addition & 0 deletions sync/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use std::collections::{HashSet, HashMap};
use std::collections::hash_map::Entry;
use smallvec::SmallVec;
use heapsize::HeapSizeOf;
use util::*;
use rlp::*;
use network::NetworkError;
Expand Down
1 change: 1 addition & 0 deletions sync/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
use std::collections::{HashSet, HashMap};
use std::cmp;
use heapsize::HeapSizeOf;
use util::*;
use rlp::*;
use network::*;
Expand Down
1 change: 0 additions & 1 deletion util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ pub use bigint::prelude::*;
pub use bigint::hash;

pub use ansi_term::{Colour, Style};
pub use heapsize::HeapSizeOf;
pub use parking_lot::{Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};

/// 160-bit integer representing account address
Expand Down

0 comments on commit 6b5ad69

Please sign in to comment.