// Create a set of PreprepareMsg and PrepareMsgs for each sequence number.
Create a set of PreprepareMsg and PrepareMsgs for each sequence number.
// Create a set of PreprepareMsg and PrepareMsgs for each sequence number .
func (node *Node) CreateSetP() map[int64]*consensus.SetPm {
	setp := make(map[int64]*consensus.SetPm)
	node.StatesMutex.RLock()
	for seqID, state := range node.States {
		var setPm consensus.SetPm
		setPm.PrePrepareMsg = state.GetPrePrepareMsg()
		setPm.PrepareMsgs = state.GetPrepareMsgs()
		setp[seqID] = &setPm
	}
	node.StatesMutex.RUnlock()
	return setp
}
func ( node * Node ) CreateSetP ( ) map [ int64 ] * consensus . SetPm { setp := make ( map [ int64 ] * consensus . SetPm ) node . StatesMutex . RLock ( ) for seqID , state := range node . States { var setPm consensus . SetPm setPm . PrePrepareMsg = state . GetPrePrepareMsg ( ) setPm . PrepareMsgs = state . GetPrepareMsgs ( ) setp [ seqID ] = & setPm } node . StatesMutex . RUnlock ( ) return setp }
Create a set of PreprepareMsg and PrepareMsgs for each sequence number.
Create a set of PreprepareMsg and PrepareMsgs for each sequence number .