Module sc_network_sync::strategy::chain_sync
source · Expand description
Contains the state of the chain synchronization process
At any given point in time, a running node tries as much as possible to be at the head of the chain. This module handles the logic of which blocks to request from remotes, and processing responses. It yields blocks to check and potentially move to the database.
§Usage
The ChainSync
struct maintains the state of the block requests. Whenever something happens on
the network, or whenever a block has been successfully verified, call the appropriate method in
order to update it.
Structs§
- The main data structure which contains all the state for a chains active syncing strategy.
Enums§
- Sync operation mode.
Functions§
- Validate that the given
blocks
are correct. Returns the number of the first block in the sequence.