Trait NetworkSyncUpdater
pub trait NetworkSyncUpdater:
Debug
+ Send
+ Sync
+ 'static {
// Required methods
fn update_sync_state(&self, state: SyncState);
fn update_status(&self, head: Head);
}
Expand description
An updater for updating the SyncState and status of the network.
The node is either syncing, or it is idle.
While syncing, the node will download data from the network and process it. The processing
consists of several stages, like recovering senders, executing the blocks and indexing.
Eventually the node reaches the Finish
stage and will transition to SyncState::Idle
, it
which point the node is considered fully synced.
Required Methods§
fn update_sync_state(&self, state: SyncState)
fn update_sync_state(&self, state: SyncState)
Notifies about a SyncState update.
fn update_status(&self, head: Head)
fn update_status(&self, head: Head)
Updates the status of the p2p node