Module massa_bootstrap::client

source ยท

Structsยง

Traitsยง

  • Specifies a common interface that can be used by standard, or mockers

Functionsยง

  • Gets the state from a bootstrap server (internal private function) needs to be CANCELLABLE
  • connect_to_server ๐Ÿ”’
  • Uses the cond-var pattern to handle sig-int cancellation. Make sure that the passed in interrupted shares its Arc with a sig-int handler setup.
  • 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.