Function massa_bootstrap::client::check_restart_metadata
source ยท fn check_restart_metadata(
cfg: &BootstrapConfig,
last_start_period: &Option<u64>,
last_slot_before_downtime: &Option<Option<Slot>>,
) -> Result<(), BootstrapError>Expand description
Checks the network restart metadata announced by a bootstrap server.
The server sends last_start_period and last_slot_before_downtime together, and only once
per stream (on the first part, before any consensus blocks). Startup derives the network
downtime range and its timestamps from them (see massa-node), assuming they describe a
coherent interval, so anything else has to be rejected as a bootstrap failure rather than
stored.