Struct vapcore_sync::SyncStatus[][src]

pub struct SyncStatus {
    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 mem_used: usize,
    pub num_snapshot_chunks: usize,
    pub snapshot_chunks_done: usize,
    pub last_imported_old_block_number: Option<BlockNumber>,
}

Syncing status and statistics

Fields

state: SyncState

State

protocol_version: u8

Syncing protocol version. That’s the maximum protocol version we connect to.

network_id: u64

The underlying p2p network version.

start_block_number: BlockNumber

BlockChain 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: BlockNumber

Total number of blocks for the sync process.

blocks_received: BlockNumber

Number of blocks downloaded so far.

num_peers: usize

Total number of connected peers

num_active_peers: usize

Total number of active peers.

mem_used: usize

Heap memory used in bytes.

num_snapshot_chunks: usize

Snapshot chunks

snapshot_chunks_done: usize

Snapshot chunks downloaded

last_imported_old_block_number: Option<BlockNumber>

Last fully downloaded and imported ancient block number (if any).

Implementations

impl SyncStatus[src]

pub fn is_snapshot_syncing(&self) -> bool[src]

Indicates if snapshot download is in progress

pub fn current_max_peers(&self, min_peers: u32, max_peers: u32) -> u32[src]

Returns max no of peers to display in informants

pub fn is_syncing(&self, queue_info: BlockQueueInfo) -> bool[src]

Is it doing a major sync?

Trait Implementations

impl Clone for SyncStatus[src]

impl Copy for SyncStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,