Function massa_bootstrap::server::run_bootstrap_session
source ยท fn run_bootstrap_session(
server: BootstrapServerBinder,
arc_counter: Arc<()>,
config: BootstrapConfig,
remote_addr: SocketAddr,
data_execution: Arc<RwLock<dyn FinalStateController>>,
version: Version,
consensus_command_sender: Box<dyn ConsensusController>,
protocol_controller: Box<dyn ProtocolController>,
massa_metrics: MassaMetrics,
)
Expand description
To be called from a thread::spawn
invocation
Runs the bootstrap management in a dedicated thread, handling the async by using
a multi-thread-aware tokio runtime (the bs-main-loop runtime, to be exact). When this
function blocks in the block_on
, it should thread-block, and switch to another session
The arc_counter variable is used as a proxy to keep track the number of active bootstrap sessions.