// IsVoterOrIncomingVoter judges whether peer role will become Voter.
// The peer is not nil and the role is equal to IncomingVoter or Voter.
IsVoterOrIncomingVoter judges whether peer role will become Voter.
The peer is not nil and the role is equal to IncomingVoter or Voter.
// IsVoterOrIncomingVoter judges whether peer role will become Voter . // The peer is not nil and the role is equal to IncomingVoter or Voter .
func IsVoterOrIncomingVoter(peer *metapb.Peer) bool {
	if peer == nil {
		return false
	}
	switch peer.GetRole() {
	case metapb.PeerRole_IncomingVoter, metapb.PeerRole_Voter:
		return true
	}
	return false
}
func IsVoterOrIncomingVoter ( peer * metapb . Peer ) bool { if peer == nil { return false } switch peer . GetRole ( ) { case metapb . PeerRole_IncomingVoter , metapb . PeerRole_Voter : return true } return false }
IsVoterOrIncomingVoter judges whether peer role will become Voter.
IsVoterOrIncomingVoter judges whether peer role will become Voter .