@@ -52,9 +52,10 @@ func DefaultGenesisState() GenesisState {
52
52
VotingPeriod : time .Duration (172800 ) * time .Second ,
53
53
},
54
54
TallyParams : TallyParams {
55
- Quorum : sdk .NewDecWithPrec (334 , 3 ),
56
- Threshold : sdk .NewDecWithPrec (5 , 1 ),
57
- Veto : sdk .NewDecWithPrec (334 , 3 ),
55
+ Quorum : sdk .NewDecWithPrec (334 , 3 ),
56
+ Threshold : sdk .NewDecWithPrec (5 , 1 ),
57
+ Veto : sdk .NewDecWithPrec (334 , 3 ),
58
+ GovernancePenalty : sdk .NewDecWithPrec (1 , 2 ),
58
59
},
59
60
}
60
61
}
@@ -73,6 +74,12 @@ func ValidateGenesis(data GenesisState) error {
73
74
veto .String ())
74
75
}
75
76
77
+ govPenalty := data .TallyParams .GovernancePenalty
78
+ if govPenalty .IsNegative () || govPenalty .GT (sdk .OneDec ()) {
79
+ return fmt .Errorf ("Governance vote veto threshold should be positive and less or equal to one, is %s" ,
80
+ govPenalty .String ())
81
+ }
82
+
76
83
if data .DepositParams .MaxDepositPeriod > data .VotingParams .VotingPeriod {
77
84
return fmt .Errorf ("Governance deposit period should be less than or equal to the voting period (%ds), is %ds" ,
78
85
data .VotingParams .VotingPeriod , data .DepositParams .MaxDepositPeriod )
0 commit comments