consensus: TimeoutTicker, skip TimeoutCommit on HasAll

This commit is contained in:
Ethan Buchman
2016-12-19 15:42:36 -05:00
parent 18b3821e06
commit faf23aa0d4
5 changed files with 122 additions and 23 deletions
+4
View File
@@ -377,6 +377,10 @@ func (voteSet *VoteSet) HasTwoThirdsAny() bool {
return voteSet.sum > voteSet.valSet.TotalVotingPower()*2/3
}
func (voteSet *VoteSet) HasAll() bool {
return voteSet.sum == voteSet.valSet.TotalVotingPower()
}
// Returns either a blockhash (or nil) that received +2/3 majority.
// If there exists no such majority, returns (nil, PartSetHeader{}, false).
func (voteSet *VoteSet) TwoThirdsMajority() (blockID BlockID, ok bool) {