-
Notifications
You must be signed in to change notification settings - Fork 20
Add time translation functions #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fd/txrdmrs
Are you sure you want to change the base?
Conversation
| POSIXTime = ℕ | ||
| POSIXTimeRange = Maybe POSIXTime × Maybe POSIXTime | ||
| ValidityInterval = Maybe Slot × Maybe Slot | ||
| slotToPOSIXTime : EpochInfo → SystemStart → Slot → Maybe POSIXTime | ||
| slotToPOSIXTime ei sysS vs = do | ||
| t ← epochInfoSlotToUTCTime ei sysS vs | ||
| just (utcTimeToPOSIXSeconds t * 1000) | ||
| transVITime | ||
| : EpochInfo | ||
| → SystemStart | ||
| → ValidityInterval | ||
| → POSIXTimeRange | ||
| transVITime ei sysS (vi , vf) = | ||
| ((vi >>= slotToPOSIXTime ei sysS) , (vf >>= slotToPOSIXTime ei sysS)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are POSIXTime and POSIXTimeRange supposed to be in the ledger spec? Should I implement them as in the Haskell implementation?
The Alonzo spec doesn't say anything about them.
| field UTCTime : Type | ||
| EpochInfo : Type | ||
| SystemStart : Type | ||
| EI : EpochInfo | ||
| SysSt : SystemStart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is making these abstract the way it should be done?
14dad53 to
4bada15
Compare
27c23f2 to
d2a1c6e
Compare
5cf45d9 to
ca26272
Compare
Addresses part of #723