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:
@@ -23,10 +23,12 @@ use hash::keccak;
|
||||
use network::PeerId;
|
||||
use network::client_version::ClientVersion;
|
||||
use rlp::Rlp;
|
||||
use snapshot::ChunkType;
|
||||
use crate::{
|
||||
snapshot_sync::ChunkType,
|
||||
sync_io::SyncIo,
|
||||
};
|
||||
use std::time::Instant;
|
||||
use std::{mem, cmp};
|
||||
use sync_io::SyncIo;
|
||||
use types::{
|
||||
BlockNumber,
|
||||
block_status::BlockStatus,
|
||||
@@ -711,7 +713,7 @@ impl SyncHandler {
|
||||
Err(e) => {
|
||||
trace!(target: "privatetx", "Ignoring the message, error queueing: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -739,7 +741,7 @@ impl SyncHandler {
|
||||
Err(e) => {
|
||||
trace!(target: "privatetx", "Ignoring the message, error queueing: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -109,11 +109,13 @@ use rlp::{RlpStream, DecoderError};
|
||||
use network::{self, PeerId, PacketId};
|
||||
use network::client_version::ClientVersion;
|
||||
use client_traits::BlockChainClient;
|
||||
use sync_io::SyncIo;
|
||||
use crate::{
|
||||
sync_io::SyncIo,
|
||||
snapshot_sync::Snapshot,
|
||||
};
|
||||
use super::{WarpSync, SyncConfig};
|
||||
use block_sync::{BlockDownloader, DownloadAction};
|
||||
use rand::{Rng, seq::SliceRandom};
|
||||
use snapshot::{Snapshot};
|
||||
use api::{EthProtocolInfo as PeerInfoDigest, WARP_SYNC_PROTOCOL_ID, PriorityTask};
|
||||
use private_tx::PrivateTxHandler;
|
||||
use transactions_stats::{TransactionsStats, Stats as TransactionStats};
|
||||
|
||||
Reference in New Issue
Block a user