// Add missing votes to the other processes based on the messages received by the current process
Add missing votes to the other processes based on the messages received by the current process
// Add missing votes to the other processes based on the messages received by the current process
func (acc *Accountability) addMissingVotes(receivedMessages []*common.Message) {
	for _, mes := range receivedMessages {
		senderHeightVoteSet, loaded := acc.heightLogs.messageLogs[mes.SenderID]
		if senderHeightVoteSet == nil || !loaded {
			senderHeightVoteSet = common.NewHeightVoteSet()
			acc.heightLogs.messageLogs[mes.SenderID] = senderHeightVoteSet
		}
		senderHeightVoteSet.AddMessage(mes)
	}
}
func ( acc * Accountability ) addMissingVotes ( receivedMessages [ ] * common . Message ) { for _ , mes := range receivedMessages { senderHeightVoteSet , loaded := acc . heightLogs . messageLogs [ mes . SenderID ] if senderHeightVoteSet == nil || ! loaded { senderHeightVoteSet = common . NewHeightVoteSet ( ) acc . heightLogs . messageLogs [ mes . SenderID ] = senderHeightVoteSet } senderHeightVoteSet . AddMessage ( mes ) } }
Add missing votes to the other processes based on the messages received by the current process
Add missing votes to the other processes based on the messages received by the current process
// add all received messages // add message if not already present in the sender vote set