-
Notifications
You must be signed in to change notification settings - Fork 1
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
Slot to Epoch, and date to slot conversion #8
Conversation
3a11a73
to
7ce62e1
Compare
@@ -26,4 +27,14 @@ public LocalDateTime slotToTime(long absoluteSlot) { | |||
// for now post byron we have 1 slot = 1 second | |||
return genesisConfig.blockTime(EraType.Shelley, absoluteSlot); | |||
} | |||
|
|||
public Long slotToEpoch(long absoluteSlot) { |
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.
Can we somehow indicate that this is partial function in Java?
https://www.pgrs.net/2015/04/23/partial-function-application-in-java-8/
like if this is byron then function doesn't work right..
What do you think?
@@ -0,0 +1,28 @@ | |||
package org.cardanofoundation.conversions.exceptioni; |
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.
why is package called in Italian? exceptioni?
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.
it was a typo, it's eccezioni
in italian, exceptioni
it's just a typo
Implementing slot to epoch conversion
[x] Shelley slot to epoch conversion
[x] Byron slot to epoch conversion
Implemented date to slot conversion
[x] Shelley date to slot conversion
[x] Byron date to slot conversion