// add a given message to the correct set of sent messages based on the type
add a given message to the correct set of sent messages based on the type
// add a given message to the correct set of sent messages based on the type
func (vs *VoteSet) addSentMessage(mes *Message) {
	switch mes.Type {
	case Prevote:
		if !contains(vs.SentPrevoteMessages, mes) {
			vs.SentPrevoteMessages = append(vs.SentPrevoteMessages, mes)
		}
	case Precommit:
		if !contains(vs.SentPrecommitMessages, mes) {
			vs.SentPrecommitMessages = append(vs.SentPrecommitMessages, mes)
		}
	}
}
func ( vs * VoteSet ) addSentMessage ( mes * Message ) { switch mes . Type { case Prevote : if ! contains ( vs . SentPrevoteMessages , mes ) { vs . SentPrevoteMessages = append ( vs . SentPrevoteMessages , mes ) } case Precommit : if ! contains ( vs . SentPrecommitMessages , mes ) { vs . SentPrecommitMessages = append ( vs . SentPrecommitMessages , mes ) } } }
add a given message to the correct set of sent messages based on the type
add a given message to the correct set of sent messages based on the type