Skip to content

Commit de4b8bc

Browse files
fix the comparison for quorum check in uniformVoteWeight
1 parent 366fce0 commit de4b8bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: consensus/quorum/one-node-one-vote.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ func (v *uniformVoteWeight) IsQuorumAchievedByMask(mask *bls_cosi.Mask) bool {
6262
}
6363
threshold := v.TwoThirdsSignersCount()
6464
currentTotalPower := utils.CountOneBits(mask.Bitmap)
65-
enoughVotingPower := currentTotalPower >= threshold
65+
enoughVotingPower := threshold >= currentTotalPower
6666
if v.useGTforQuorumChecking {
67-
enoughVotingPower = currentTotalPower > threshold
67+
enoughVotingPower = threshold > currentTotalPower
6868
}
6969
if !enoughVotingPower {
7070
const msg = "[IsQuorumAchievedByMask] Not enough voting power: need %+v, have %+v"

0 commit comments

Comments
 (0)