Function massa_bootstrap::client::stream_final_state_and_consensus
source ยท fn stream_final_state_and_consensus(
cfg: &BootstrapConfig,
client: &mut BootstrapClientBinder,
next_bootstrap_message: &mut BootstrapClientMessage,
global_bootstrap_state: &mut GlobalBootstrapState,
) -> Result<(), BootstrapError>
Expand description
This function will send the starting point to receive a stream of the ledger and will receive and process each part until receive a BootstrapServerMessage::FinalStateFinished
message from the server.
next_bootstrap_message
passed as parameter must be BootstrapClientMessage::AskFinalStatePart
enum variant.
next_bootstrap_message
will be updated after receiving each part so that in case of connection lost we can restart from the last message we processed.