Moved syncing log out of the client (#1670)

This commit is contained in:
Arkadiy Paronyan
2016-07-20 12:36:20 +02:00
committed by Gav Wood
parent 0cba70fba3
commit b007770ba8
8 changed files with 120 additions and 103 deletions

View File

@@ -124,7 +124,8 @@ impl ChainNotify for EthSync {
invalid: Vec<H256>,
enacted: Vec<H256>,
retracted: Vec<H256>,
sealed: Vec<H256>)
sealed: Vec<H256>,
_duration: u64)
{
self.network.with_context(ETH_PROTOCOL, |context| {
let mut sync_io = NetSyncIo::new(context, self.handler.chain.deref());

View File

@@ -178,6 +178,13 @@ pub struct SyncStatus {
pub mem_used: usize,
}
impl SyncStatus {
/// Indicates if initial sync is still in progress.
pub fn is_major_syncing(&self) -> bool {
self.state != SyncState::Idle && self.state != SyncState::NewBlocks
}
}
#[derive(PartialEq, Eq, Debug, Clone)]
/// Peer data type requested
enum PeerAsking {