// CountInJointState count the peers are in joint state.
CountInJointState count the peers are in joint state.
// CountInJointState count the peers are in joint state .
func CountInJointState(peers ...*metapb.Peer) int {
	count := 0
	for _, peer := range peers {
		switch peer.GetRole() {
		case metapb.PeerRole_IncomingVoter, metapb.PeerRole_DemotingVoter:
			count++
		default:
		}
	}
	return count
}
func CountInJointState ( peers ... * metapb . Peer ) int { count := 0 for _ , peer := range peers { switch peer . GetRole ( ) { case metapb . PeerRole_IncomingVoter , metapb . PeerRole_DemotingVoter : count ++ default : } } return count }
CountInJointState count the peers are in joint state.
CountInJointState count the peers are in joint state .