Moved syncing log out of the client (#1670)
This commit is contained in:
committed by
Gav Wood
parent
0cba70fba3
commit
b007770ba8
@@ -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());
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user