Struct ethcore_sync::SyncStatus
source · [−]pub struct SyncStatus {Show 14 fields
pub state: SyncState,
pub protocol_version: u8,
pub network_id: u64,
pub start_block_number: BlockNumber,
pub last_imported_block_number: Option<BlockNumber>,
pub highest_block_number: Option<BlockNumber>,
pub blocks_total: BlockNumber,
pub blocks_received: BlockNumber,
pub num_peers: usize,
pub num_active_peers: usize,
pub num_snapshot_chunks: usize,
pub snapshot_chunks_done: usize,
pub last_imported_old_block_number: Option<BlockNumber>,
pub item_sizes: BTreeMap<String, usize>,
}Expand description
Syncing status and statistics
Fields
state: SyncStateState
protocol_version: u8Syncing protocol version. That’s the maximum protocol version we connect to.
network_id: u64The underlying p2p network version.
start_block_number: BlockNumberBlockChain height for the moment the sync started.
last_imported_block_number: Option<BlockNumber>Last fully downloaded and imported block number (if any).
highest_block_number: Option<BlockNumber>Highest block number in the download queue (if any).
blocks_total: BlockNumberTotal number of blocks for the sync process.
blocks_received: BlockNumberNumber of blocks downloaded so far.
num_peers: usizeTotal number of connected peers
num_active_peers: usizeTotal number of active peers.
num_snapshot_chunks: usizeSnapshot chunks
snapshot_chunks_done: usizeSnapshot chunks downloaded
last_imported_old_block_number: Option<BlockNumber>Last fully downloaded and imported ancient block number (if any).
item_sizes: BTreeMap<String, usize>Internal structure item numbers
Implementations
sourceimpl SyncStatus
impl SyncStatus
sourcepub fn is_snapshot_syncing(&self) -> bool
pub fn is_snapshot_syncing(&self) -> bool
Indicates if snapshot download is in progress
sourcepub fn current_max_peers(&self, min_peers: u32, max_peers: u32) -> u32
pub fn current_max_peers(&self, min_peers: u32, max_peers: u32) -> u32
Returns max no of peers to display in informants
sourcepub fn is_syncing(&self, queue_info: BlockQueueInfo) -> bool
pub fn is_syncing(&self, queue_info: BlockQueueInfo) -> bool
Is it doing a major sync?
Trait Implementations
sourceimpl Clone for SyncStatus
impl Clone for SyncStatus
sourcefn clone(&self) -> SyncStatus
fn clone(&self) -> SyncStatus
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for SyncStatus
impl Send for SyncStatus
impl Sync for SyncStatus
impl Unpin for SyncStatus
impl UnwindSafe for SyncStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more