Module client

Module client 

Source

Structsยง

DefaultConnector
Initiates a connection with given timeout in milliseconds

Traitsยง

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

Functionsยง

align_consensus_resume_state_before_ask ๐Ÿ”’
bootstrap_from_server ๐Ÿ”’
Gets the state from a bootstrap server (internal private function) needs to be CANCELLABLE
capped_consensus_cursor_ids ๐Ÿ”’
Ids for the reconnect ask: all finals if under the cap, otherwise the newest max_ids by slot.
capped_consensus_resume_step ๐Ÿ”’
check_restart_metadata ๐Ÿ”’
Checks the network restart metadata announced by a bootstrap server.
connect_to_server ๐Ÿ”’
filter_bootstrap_list ๐Ÿ”’
get_bootstrap_list_iter ๐Ÿ”’
get_state
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.
restart_state_streaming ๐Ÿ”’
Drop everything streamed from the current server so that the next attempt streams the state again from scratch, instead of resuming on top of what this server sent.
send_client_message ๐Ÿ”’
shutdown_range ๐Ÿ”’
Computes the slot range of the last network shutdown, as startup does: from the slot right after the last one executed before the downtime, to the slot right before the restart.
stream_final_state_and_consensus ๐Ÿ”’
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.
warn_user_about_versioning_updates ๐Ÿ”’