check minimum stake amount while voting
This commit is contained in:
parent
1b3ec260a3
commit
270c984f8d
10 changed files with 88 additions and 49 deletions
|
|
@ -679,7 +679,7 @@ getNextState = \case
|
|||
-- | Calculate the number of GTs per stake in order to exceed the minimum limit.
|
||||
compPerStakeGTsForDraft :: NumStake -> Integer
|
||||
compPerStakeGTsForDraft nCosigners =
|
||||
untag (def :: ProposalThresholds).vote
|
||||
untag (def :: ProposalThresholds).toVoting
|
||||
`div` fromIntegral nCosigners + 1
|
||||
|
||||
dummyDatum :: ()
|
||||
|
|
@ -944,7 +944,7 @@ mkInsufficientCosignsBundle nCosigners nEffects =
|
|||
}
|
||||
where
|
||||
insuffcientPerStakeGTs =
|
||||
untag (def :: ProposalThresholds).vote
|
||||
untag (def :: ProposalThresholds).toVoting
|
||||
`div` fromIntegral nCosigners - 1
|
||||
template = mkValidToNextStateBundle nCosigners nEffects False Draft
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue