store starting time of the proposal in its datum

... hardcoded to 0 upon creation for now
This commit is contained in:
fanghr 2022-05-18 21:01:14 +08:00
parent d44fe083da
commit fc48709c07
7 changed files with 26 additions and 2 deletions

View file

@ -152,6 +152,7 @@ proposalValidator proposal =
, "thresholds"
, "votes"
, "timingConfig"
, "startingTime"
]
proposalDatum
@ -255,6 +256,7 @@ proposalValidator proposal =
.& #thresholds .= proposalF.thresholds
.& #votes .= pdata expectedNewVotes
.& #timingConfig .= proposalF.timingConfig
.& #startingTime .= proposalF.startingTime
)
tcassert "Invalid output proposal" $ proposalOut #== expectedProposalOut
@ -345,6 +347,7 @@ proposalValidator proposal =
.& #thresholds .= proposalF.thresholds
.& #votes .= proposalF.votes
.& #timingConfig .= proposalF.timingConfig
.& #startingTime .= proposalF.startingTime
)
)
in foldr1