func (hvs *HeightVoteSet) SetRound(round def.INT) {
	hvs.mtx.Lock()
	defer hvs.mtx.Unlock()
	if hvs.round != 0 && (round < hvs.round+1) {
		PanicSanity("SetRound() must increment hvs.round")
	}
	for r := hvs.round + 1; r <= round; r++ {
		if _, ok := hvs.roundVoteSets[r]; ok {
			continue  
		}
		hvs.addRound(r)
	}
	hvs.round = round
}
Create more RoundVoteSets up to round.
package consensus
import (
	"strings"
	"sync"
	pbtypes "github.com/annchain/annchain/angine/protos/types"
	agtypes "github.com/annchain/annchain/angine/types"
	"github.com/pkg/errors"
	. "github.com/annchain/annchain/module/lib/go-common"
	"github.com/annchain/annchain/module/xlib/def"
)
type RoundVoteSet struct {
	Prevotes   *agtypes.VoteSet
	Precommits *agtypes.VoteSet
}
type HeightVoteSet struct {
	chainID string
	height  def.INT
	valSet  *agtypes.ValidatorSet
	mtx               sync.Mutex
	round             def.INT                   
	roundVoteSets     map[def.INT]RoundVoteSet  
	peerCatchupRounds map[string][]def.INT      
}
func NewHeightVoteSet(chainID string, height def.INT, valSet *agtypes.ValidatorSet) *HeightVoteSet {
	hvs := &HeightVoteSet{
		chainID: chainID,
	}
	hvs.Reset(height, valSet)
	return hvs
}
func (hvs *HeightVoteSet) Reset(height def.INT, valSet *agtypes.ValidatorSet) {
	hvs.mtx.Lock()
	defer hvs.mtx.Unlock()
	hvs.height = height
	hvs.valSet = valSet
	hvs.roundVoteSets = make(map[def.INT]RoundVoteSet)
	hvs.peerCatchupRounds = make(map[string][]def.INT)
	hvs.addRound(0)
	hvs.round = 0
}
func (hvs *HeightVoteSet) Height() def.INT {
	hvs.mtx.Lock()
	defer hvs.mtx.Unlock()
	return hvs.height
}
func (hvs *HeightVoteSet) Round() def.INT {
	hvs.mtx.Lock()
	defer hvs.mtx.Unlock()
	return hvs.round
}