Remove the dependency on heapsize (#2459)

* Remove heapsize dependency

* Finish removing heapsize

* Revert accidental change

* Fix Cargo.lock
This commit is contained in:
Pierre Krieger
2019-05-04 13:59:59 +02:00
committed by Gavin Wood
parent 9fdd7df582
commit 5a820db7f5
23 changed files with 62 additions and 111 deletions
+4 -5
View File
@@ -33,7 +33,6 @@ use crate::light::blockchain::{Blockchain, Storage as BlockchainStorage};
use crate::light::fetcher::{Fetcher, RemoteReadRequest};
use hash_db::Hasher;
use trie::MemoryDB;
use heapsize::HeapSizeOf;
use consensus::well_known_cache_keys;
const IN_MEMORY_EXPECT_PROOF: &str = "InMemory state backend has Void error type and always suceeds; qed";
@@ -108,7 +107,7 @@ impl<S, F, Block, H> ClientBackend<Block, H> for Backend<S, F, H> where
S: BlockchainStorage<Block>,
F: Fetcher<Block>,
H: Hasher<Out=Block::Hash>,
H::Out: HeapSizeOf + Ord,
H::Out: Ord,
{
type BlockImportOperation = ImportOperation<Block, S, F, H>;
type Blockchain = Blockchain<S, F>;
@@ -222,7 +221,7 @@ where
S: BlockchainStorage<Block>,
F: Fetcher<Block>,
H: Hasher<Out=Block::Hash>,
H::Out: HeapSizeOf + Ord,
H::Out: Ord,
{
fn is_local_state_available(&self, block: &BlockId<Block>) -> bool {
self.genesis_state.read().is_some()
@@ -238,7 +237,7 @@ where
F: Fetcher<Block>,
S: BlockchainStorage<Block>,
H: Hasher<Out=Block::Hash>,
H::Out: HeapSizeOf + Ord,
H::Out: Ord,
{
type State = OnDemandOrGenesisState<Block, S, F, H>;
@@ -390,7 +389,7 @@ where
F: Fetcher<Block>,
S: BlockchainStorage<Block>,
H: Hasher<Out=Block::Hash>,
H::Out: HeapSizeOf + Ord,
H::Out: Ord,
{
type Error = ClientError;
type Transaction = ();