apply formatting

This commit is contained in:
Emily Martins 2022-10-31 13:43:32 +01:00
parent e9adfc6386
commit ffd1c8c8ba
5 changed files with 18 additions and 11 deletions

View file

@ -616,7 +616,8 @@ mkInTimeTimeRange advanceFrom =
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime
+ (def :: ProposalTimingConfig).lockingTime
+ (def :: ProposalTimingConfig).executingTime - 1
+ (def :: ProposalTimingConfig).executingTime
- 1
)
Finished -> error "Cannot advance 'Finished' proposal"
@ -632,7 +633,8 @@ mkTooLateTimeRange advanceFrom =
(proposalStartingTime + (def :: ProposalTimingConfig).draftTime + 1)
( proposalStartingTime
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime - 1
+ (def :: ProposalTimingConfig).votingTime
- 1
)
-- [S + D + V + L + 1, S + D + V + L + E -1]
VotingReady ->
@ -682,7 +684,8 @@ compPerStakeGTsForDraft :: NumStake -> Tagged GTTag Integer
compPerStakeGTsForDraft nCosigners =
Tagged $
untag (def :: ProposalThresholds).toVoting
`div` fromIntegral nCosigners + 1
`div` fromIntegral nCosigners
+ 1
dummyDatum :: ()
dummyDatum = ()
@ -948,7 +951,8 @@ mkInsufficientCosignsBundle nCosigners nEffects =
insuffcientPerStakeGTs =
Tagged $
untag (def :: ProposalThresholds).toVoting
`div` fromIntegral nCosigners - 1
`div` fromIntegral nCosigners
- 1
template = mkValidToNextStateBundle nCosigners nEffects False Draft
-- * From VotingReady

View file

@ -294,7 +294,8 @@ cosign ps = builder
closedBoundedInterval
(coerce proposalInputDatum.startingTime + 1)
( coerce proposalInputDatum.startingTime
+ proposalInputDatum.timingConfig.draftTime - 1
+ proposalInputDatum.timingConfig.draftTime
- 1
)
sig =

View file

@ -348,7 +348,8 @@ unlock ps = builder
in closedBoundedInterval (lb + 1) (ub - 1)
AfterVoting ->
let lb =
s + (def :: ProposalTimingConfig).draftTime
s
+ (def :: ProposalTimingConfig).draftTime
+ (def :: ProposalTimingConfig).votingTime
ub = lb + (def :: ProposalTimingConfig).lockingTime
in closedBoundedInterval (lb + 1) (ub - 1)