fn round_robin_master(&mut self) -> NodeState {
        let next_index = (self.master_index + 1) % self.params.pubkey_list.len();
        self.master_index = next_index;
        let next_state = if self.params.self_node_index == next_index {
            // self node is master.
            self.start_new_round()
        } else {
            NodeState::Member
        };
        log::info!(
            "Round Robin: Next State {:?}, node_index: {}, master_inde: {}",
            next_state,
            self.params.self_node_index,
            self.master_index
        );
        next_state
    }
/// Master role pass to the node of next index.
Master role pass to the node of next index.
Master role pass to the node of next index .
fn round_robin_master(&mut self) -> NodeState {
        let next_index = (self.master_index + 1) % self.params.pubkey_list.len();
        self.master_index = next_index;
        let next_state = if self.params.self_node_index == next_index {
            // self node is master.
            self.start_new_round()
        } else {
            NodeState::Member
        };
        log::info!(
            "Round Robin: Next State {:?}, node_index: {}, master_inde: {}",
            next_state,
            self.params.self_node_index,
            self.master_index
        );
        next_state
    }
fn round_robin_master ( & mut self ) -> NodeState { let next_index = ( self . master_index + 1 ) % self . params . pubkey_list . len ( ) ; self . master_index = next_index ; let next_state = if self . params . self_node_index == next_index { // self node is master. self . start_new_round ( ) } else { NodeState :: Member } ; log :: info ! ( " " next_state self params self_node_index self master_index ) ; next_state }
Master role pass to the node of next index.
Master role pass to the node of next index .
&mut self
&mut self