correctly handle proposal time
This commit is contained in:
parent
d0f3162fdc
commit
db15b4c218
3 changed files with 141 additions and 131 deletions
|
|
@ -339,15 +339,19 @@ unlock ps = builder
|
|||
|
||||
---
|
||||
|
||||
ProposalStartingTime s = defStartingTime
|
||||
|
||||
time = case ps.transactionParameters.timeRange of
|
||||
WhileVoting ->
|
||||
closedBoundedInterval
|
||||
((def :: ProposalTimingConfig).draftTime + 1)
|
||||
((def :: ProposalTimingConfig).votingTime - 1)
|
||||
let lb = s + (def :: ProposalTimingConfig).draftTime
|
||||
ub = lb + (def :: ProposalTimingConfig).votingTime
|
||||
in closedBoundedInterval (lb + 1) (ub - 1)
|
||||
AfterVoting ->
|
||||
closedBoundedInterval
|
||||
((def :: ProposalTimingConfig).votingTime + 1)
|
||||
((def :: ProposalTimingConfig).lockingTime - 1)
|
||||
let lb =
|
||||
s + (def :: ProposalTimingConfig).draftTime
|
||||
+ (def :: ProposalTimingConfig).votingTime
|
||||
ub = lb + (def :: ProposalTimingConfig).lockingTime
|
||||
in closedBoundedInterval (lb + 1) (ub - 1)
|
||||
|
||||
sig = case ps.transactionParameters.signedBy of
|
||||
Unknown -> defUnknown
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue