pub fn bootstrap(
        config: &NodeConfig,
        db: Arc<dyn DbReader>,
        ac_sender: MempoolClientSender,
    ) -> Runtime {
        let runtime = Builder::new()
            .thread_name("ac-service-")
            .threaded_scheduler()
            .enable_all()
            .build()
            .expect("[admission control] failed to create runtime");

        let admission_control_service = AdmissionControlService::new(ac_sender, db);

        runtime.spawn(
            tonic::transport::Server::builder()
                .add_service(AdmissionControlServer::new(admission_control_service))
                .serve(config.admission_control.address),
        );
        runtime
    }
/// Creates and spins up AdmissionControlService on runtime
/// Returns the runtime on which Admission Control Service is newly spawned
Creates and spins up AdmissionControlService on runtime
Returns the runtime on which Admission Control Service is newly spawned
Creates and spins up AdmissionControlService on runtime Returns the runtime on which Admission Control Service is newly spawned
pub fn bootstrap(
        config: &NodeConfig,
        db: Arc<dyn DbReader>,
        ac_sender: MempoolClientSender,
    ) -> Runtime {
        let runtime = Builder::new()
            .thread_name("ac-service-")
            .threaded_scheduler()
            .enable_all()
            .build()
            .expect("[admission control] failed to create runtime");
        let admission_control_service = AdmissionControlService::new(ac_sender, db);
        runtime.spawn(
            tonic::transport::Server::builder()
                .add_service(AdmissionControlServer::new(admission_control_service))
                .serve(config.admission_control.address),
        );
        runtime
    }
pub fn bootstrap ( config : & NodeConfig , db : Arc < dyn DbReader > , ac_sender : MempoolClientSender , ) -> Runtime { let runtime = Builder :: new ( ) . thread_name ( " " ) . threaded_scheduler ( ) . enable_all ( ) . build ( ) . expect ( " " ) ; let admission_control_service = AdmissionControlService :: new ( ac_sender , db ) ; runtime . spawn ( tonic :: transport :: Server :: builder ( ) . add_service ( AdmissionControlServer :: new ( admission_control_service ) ) . serve ( config . admission_control . address ) , ) ; runtime }
Creates and spins up AdmissionControlService on runtime
Returns the runtime on which Admission Control Service is newly spawned
Creates and spins up AdmissionControlService on runtime Returns the runtime on which Admission Control Service is newly spawned
config
&NodeConfig
db
Arc<dyn DbReader>
ac_sender
MempoolClientSender
config
&NodeConfig
db
Arc<dyn DbReader>
ac_sender
MempoolClientSender