async fn process_payload(&mut self, payload: OnChainConfigPayload) {
        let _process_timer = EVENT_PROCESSING_LOOP_BUSY_DURATION_S.start_timer();

        let node_set: ValidatorSet = payload
            .get()
            .expect("failed to get ValidatorSet from payload");

        let updates = extract_updates(self.network_context.clone(), &self.encryptor, node_set);

        inc_by_with_context(
            &DISCOVERY_COUNTS,
            &self.network_context,
            "new_nodes",
            updates.len() as u64,
        );
        info!(
            NetworkSchema::new(&self.network_context),
            "Update {} Network about new Node IDs",
            self.network_context.role()
        );

        for update in updates {
            match self.conn_mgr_reqs_tx.send(update).await {
                Ok(()) => (),
                Err(e) => {
                    inc_by_with_context(
                        &DISCOVERY_COUNTS,
                        &self.network_context,
                        "send_failure",
                        1,
                    );
                    warn!(
                        NetworkSchema::new(&self.network_context),
                        "Failed to send update to ConnectivityManager {}", e
                    )
                }
            }
        }
    }
/// Processes a received OnChainConfigPayload. Depending on role (Validator or FullNode), parses
/// the appropriate configuration changes and passes it to the ConnectionManager channel.
Processes a received OnChainConfigPayload. Depending on role (Validator or FullNode), parses
the appropriate configuration changes and passes it to the ConnectionManager channel.
Processes a received OnChainConfigPayload . Depending on role ( Validator or FullNode ) parses the appropriate configuration changes and passes it to the ConnectionManager channel .
async fn process_payload(&mut self, payload: OnChainConfigPayload) {
        let _process_timer = EVENT_PROCESSING_LOOP_BUSY_DURATION_S.start_timer();
        let node_set: ValidatorSet = payload
            .get()
            .expect("failed to get ValidatorSet from payload");
        let updates = extract_updates(self.network_context.clone(), &self.encryptor, node_set);
        inc_by_with_context(
            &DISCOVERY_COUNTS,
            &self.network_context,
            "new_nodes",
            updates.len() as u64,
        );
        info!(
            NetworkSchema::new(&self.network_context),
            "Update {} Network about new Node IDs",
            self.network_context.role()
        );
        for update in updates {
            match self.conn_mgr_reqs_tx.send(update).await {
                Ok(()) => (),
                Err(e) => {
                    inc_by_with_context(
                        &DISCOVERY_COUNTS,
                        &self.network_context,
                        "send_failure",
                        1,
                    );
                    warn!(
                        NetworkSchema::new(&self.network_context),
                        "Failed to send update to ConnectivityManager {}", e
                    )
                }
            }
        }
    }
async fn process_payload ( & mut self , payload : OnChainConfigPayload ) { let _process_timer = EVENT_PROCESSING_LOOP_BUSY_DURATION_S . start_timer ( ) ; let node_set : ValidatorSet = payload . get ( ) . expect ( " " ) ; let updates = extract_updates ( self . network_context . clone ( ) , & self . encryptor , node_set ) ; inc_by_with_context ( & DISCOVERY_COUNTS , & self . network_context , " " , updates . len ( ) as u64 , ) ; info ! ( NetworkSchema new ( self network_context ) " " self network_context role ( ) ) ; for update in updates { match self . conn_mgr_reqs_tx . send ( update ) . await { Ok ( ( ) ) => ( ) , Err ( e ) => { inc_by_with_context ( & DISCOVERY_COUNTS , & self . network_context , " " , 1 , ) ; warn ! ( NetworkSchema new ( self network_context ) " " e ) } } } }
Processes a received OnChainConfigPayload.
Processes a received OnChainConfigPayload .
&mut self
payload
OnChainConfigPayload
&mut self
payload
OnChainConfigPayload