// setHasVote sets the HasVote status of all the given machines to hasVote.
3803
func setHasVote(ms []*machineTracker, hasVote bool) error {
	if len(ms) == 0 {
		return nil
	}
	logger.Infof("setting HasVote=%v on machines %v", hasVote, ms)
	for _, m := range ms {
		if err := m.stm.SetHasVote(hasVote); err != nil {
			return fmt.Errorf("cannot set voting status of %q to %v: %v", m.Id(), hasVote, err)
		}
	}
	return nil
}
567307
func (ps *PeerState) ApplyHasVoteMessage(msg *HasVoteMessage) {
	ps.mtx.Lock()
	defer ps.mtx.Unlock()

	if ps.PRS.Height != msg.Height {
		return
	}

	ps.setHasVote(msg.Height, msg.Round, msg.Type, msg.Index)
}
775904
func (s *OutputSettings) SetHlsSettings(v *HlsSettings) *OutputSettings {
	s.HlsSettings = v
	return s
}
504240
func (s *APNSSandboxChannelResponse) SetHasCredential(v bool) *APNSSandboxChannelResponse {
	s.HasCredential = &v
	return s
}
492370
func (s *HlsOutputSettings) SetHlsSettings(v *HlsSettings) *HlsOutputSettings {
	s.HlsSettings = v
	return s
}
1336572
func (s *InviteAccountToOrganizationOutput) SetHandshake(v *Handshake) *InviteAccountToOrganizationOutput {
	s.Handshake = v
	return s
}
1310802
func (s *DescribeHsmInput) SetHsmSerialNumber(v string) *DescribeHsmInput {
	s.HsmSerialNumber = &v
	return s
}
84661
func (s *CustomCodeSigning) SetHashAlgorithm(v string) *CustomCodeSigning {
	s.HashAlgorithm = &v
	return s
}
1013008
func SetHookAsync(async bool) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetHookAsync(async)
}
681452
func (s *APNSChannelResponse) SetHasTokenKey(v bool) *APNSChannelResponse {
	s.HasTokenKey = &v
	return s
}
1067195
func (s *ListPipelinesOutput) SetHasMoreResults(v bool) *ListPipelinesOutput {
	s.HasMoreResults = &v
	return s
}
1160052
func (ps *PeerState) SetHasVote(vote *types.Vote) {
	ps.mtx.Lock()
	defer ps.mtx.Unlock()

	ps.setHasVote(vote.Height, vote.Round, vote.Type, vote.ValidatorIndex)
}
546707
func (s *TraceSummary) SetHasError(v bool) *TraceSummary {
	s.HasError = &v
	return s
}
1264761
func (s *Cluster) SetHsms(v []*Hsm) *Cluster {
	s.Hsms = v
	return s
}
298715
func (s *ChannelResponse) SetHasCredential(v bool) *ChannelResponse {
	s.HasCredential = &v
	return s
}
1141891
func (e *Engine) setHAState(state seesaw.HAState) {
	e.haManager.stateChan <- state
}
587267
func (a *ACLToken) SetHash() []byte {
	// Initialize a 256bit Blake2 hash (32 bytes)
	hash, err := blake2b.New256(nil)
	if err != nil {
		panic(err)
	}

	// Write all the user set fields
	hash.Write([]byte(a.Name))
	hash.Write([]byte(a.Type))
	for _, policyName := range a.Policies {
		hash.Write([]byte(policyName))
	}
	if a.Global {
		hash.Write([]byte("global"))
	} else {
		hash.Write([]byte("local"))
	}

	// Finalize the hash
	hashVal := hash.Sum(nil)

	// Set and return the hash
	a.Hash = hashVal
	return hashVal
}