Extract snapshot to own crate (#11010)

* Move snapshot to own crate
Sort out imports

* WIP cargo toml

* Make snapshotting generic over the client
Sort out tests

* Sort out types from blockchain and client

* Sort out sync

* Sort out imports and generics

* Sort out main binary

* Fix sync test-helpers

* Sort out import for secret-store

* Sort out more imports

* Fix easy todos

* cleanup

* Cleanup

* remove unneded workspace member

* cleanup

* Sort out test-helpers dependency on account-db

* Update ethcore/client-traits/src/lib.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update ethcore/snapshot/Cargo.toml
This commit is contained in:
David
2019-09-03 11:29:25 +02:00
committed by GitHub
parent 396ccdbcc1
commit d193ddde19
68 changed files with 627 additions and 486 deletions

View File

@@ -87,6 +87,7 @@ extern crate rlp;
extern crate account_state;
extern crate stats;
extern crate snapshot;
extern crate tempdir;
extern crate trace;
extern crate vm;

View File

@@ -29,7 +29,7 @@ use client_traits::{BlockChainClient, StateClient, ProvingBlockChainClient, Stat
use ethash::{self, SeedHashCompute};
use ethcore::client::{Call, EngineInfo};
use ethcore::miner::{self, MinerService};
use ethcore::snapshot::SnapshotService;
use snapshot::SnapshotService;
use hash::keccak;
use miner::external::ExternalMinerService;
use sync::SyncProvider;

View File

@@ -31,8 +31,7 @@ use v1::traits::EthPubSub;
use v1::types::{pubsub, RichHeader, Log};
use sync::{SyncState, Notification};
use ethcore::client::{ChainNotify, NewBlocks, ChainRouteType};
use client_traits::BlockChainClient;
use client_traits::{BlockChainClient, ChainNotify};
use ethereum_types::H256;
use light::cache::Cache;
use light::client::{LightChainClient, LightChainNotify};
@@ -43,6 +42,7 @@ use parking_lot::{RwLock, Mutex};
use sync::{LightSyncProvider, LightNetworkDispatcher, ManageNetwork};
use types::{
chain_notify::{NewBlocks, ChainRouteType},
ids::BlockId,
encoded,
filter::Filter as EthFilter,

View File

@@ -23,7 +23,7 @@ use ethereum_types::{H64, H160, H256, H512, U64, U256};
use ethcore::client::Call;
use client_traits::{BlockChainClient, StateClient};
use ethcore::miner::{self, MinerService, FilterOptions};
use ethcore::snapshot::SnapshotService;
use snapshot::SnapshotService;
use account_state::state::StateInfo;
use ethcore_logger::RotatingLogger;
use ethkey::{crypto::ecies, Brain, Generator};

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
use ethcore::snapshot::SnapshotService;
use snapshot::SnapshotService;
use bytes::Bytes;
use ethereum_types::H256;

View File

@@ -23,11 +23,12 @@ use jsonrpc_pubsub::Session;
use std::time::Duration;
use v1::{EthPubSub, EthPubSubClient, Metadata};
use ethcore::client::{TestBlockChainClient, EachBlockWith, ChainNotify, NewBlocks, ChainRoute, ChainRouteType};
use ethcore::client::{TestBlockChainClient, EachBlockWith};
use parity_runtime::Runtime;
use ethereum_types::{Address, H256};
use client_traits::BlockInfo;
use client_traits::{BlockInfo, ChainNotify};
use types::{
chain_notify::{NewBlocks, ChainRoute, ChainRouteType},
log_entry::{LocalizedLogEntry, LogEntry},
ids::BlockId,
};