separate trie from util and make its dependencies into libs:

* bytes
* hashdb
* memorydb
* nibbleslice
* nibblevec
This commit is contained in:
Hawstein
2017-09-07 02:47:45 +08:00
parent 79659bdc76
commit ade37be25b
182 changed files with 497 additions and 251 deletions

View File

@@ -17,7 +17,7 @@
use std::sync::Arc;
use std::collections::{HashMap, BTreeMap};
use std::io;
use util::Bytes;
use bytes::Bytes;
use network::{NetworkProtocolHandler, NetworkService, NetworkContext, HostInfo, PeerId, ProtocolId,
NetworkConfiguration as BasicNetworkConfiguration, NonReservedPeerMode, NetworkError, ConnectionFilter};
use bigint::prelude::U256;

View File

@@ -22,6 +22,7 @@ use heapsize::HeapSizeOf;
use bigint::hash::H256;
use triehash::ordered_trie_root;
use util::*;
use bytes::Bytes;
use rlp::*;
use network::NetworkError;
use ethcore::header::Header as BlockHeader;

View File

@@ -96,7 +96,7 @@ use heapsize::HeapSizeOf;
use bigint::prelude::U256;
use bigint::hash::{H256, H256FastMap};
use parking_lot::RwLock;
use util::*;
use bytes::Bytes;
use rlp::*;
use network::*;
use ethcore::header::{BlockNumber, Header as BlockHeader};
@@ -2237,7 +2237,7 @@ mod tests {
use bigint::hash::H256;
use util::Address;
use parking_lot::RwLock;
use util::bytes::Bytes;
use bytes::Bytes;
use rlp::{Rlp, RlpStream, UntrustedRlp};
use super::*;
use ::SyncConfig;

View File

@@ -29,6 +29,7 @@
extern crate ethcore_network as network;
extern crate ethcore_bigint as bigint;
extern crate ethcore_bytes as bytes;
extern crate ethcore_io as io;
extern crate ethcore;
extern crate env_logger;

View File

@@ -137,7 +137,7 @@ impl Snapshot {
#[cfg(test)]
mod test {
use hash::keccak;
use util::*;
use bytes::Bytes;
use super::*;
use ethcore::snapshot::ManifestData;

View File

@@ -16,7 +16,7 @@
use std::collections::HashMap;
use network::{NetworkContext, PeerId, PacketId, NetworkError, SessionInfo, ProtocolId};
use util::Bytes;
use bytes::Bytes;
use ethcore::client::BlockChainClient;
use ethcore::header::BlockNumber;
use ethcore::snapshot::SnapshotService;

View File

@@ -18,7 +18,7 @@ use std::collections::{VecDeque, HashSet, HashMap};
use std::sync::Arc;
use bigint::hash::H256;
use parking_lot::RwLock;
use util::*;
use bytes::Bytes;
use network::*;
use tests::snapshot::*;
use ethcore::client::{TestBlockChainClient, BlockChainClient, Client as EthcoreClient, ClientConfig, ChainNotify};

View File

@@ -19,7 +19,7 @@ use std::sync::Arc;
use hash::keccak;
use bigint::hash::H256;
use parking_lot::Mutex;
use util::*;
use bytes::Bytes;
use ethcore::snapshot::{SnapshotService, ManifestData, RestorationStatus};
use ethcore::header::BlockNumber;
use ethcore::client::{EachBlockWith};