🐛 Fix missing unanimous quorum/threshold

This commit is contained in:
Brian Wiborg 2024-05-13 12:12:43 +02:00
parent c2d2df3254
commit 53ad7ed03d
No known key found for this signature in database
GPG Key ID: BE53FA9286B719D6
2 changed files with 3 additions and 4 deletions

View File

@ -23,7 +23,7 @@ const (
func ValidQuorums() []Quorum { func ValidQuorums() []Quorum {
return []Quorum{ return []Quorum{
Simple, Simple, Unanimous,
OneFifth, OneQuarter, OneThird, OneHalf, OneFifth, OneQuarter, OneThird, OneHalf,
TwoThirds, TwoFifths, TwoThirds, TwoFifths,
ThreeQuarters, ThreeFifths, ThreeQuarters, ThreeFifths,
@ -97,7 +97,6 @@ func (q Quorum) IsSatisfied(possibleVotes, totalVotes int) bool {
case Unanimous: case Unanimous:
return totalVotes >= possibleVotes return totalVotes >= possibleVotes
default: default:
panic("this code should never be reached⚜️") panic("this code should never be reached")
} }
return false
} }

View File

@ -23,7 +23,7 @@ const (
func ValidThresholds() []Threshold { func ValidThresholds() []Threshold {
return []Threshold{ return []Threshold{
Simple, Simple, Unanimous,
OneFifth, OneQuarter, OneThird, OneHalf, OneFifth, OneQuarter, OneThird, OneHalf,
TwoFifths, TwoThirds, TwoFifths, TwoThirds,
ThreeFifths, ThreeQuarters, ThreeFifths, ThreeFifths, ThreeQuarters, ThreeFifths,