-
Notifications
You must be signed in to change notification settings - Fork 19
fix: slot length is a ratio #1046
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
Conversation
cmd/gouroboros/query.go
Outdated
@@ -140,7 +140,7 @@ func testQuery(f *globalFlags) { | |||
fmt.Printf("era-history:\n") | |||
for eraId, era := range eraHistory { | |||
fmt.Printf( | |||
"id = %d, begin slot/epoch = %d/%d, end slot/epoch = %d/%d, epoch length = %d, slot length (ms) = %d, slots per KES period = %d\n", | |||
"id = %d, begin slot/epoch = %d/%d, end slot/epoch = %d/%d, epoch length = %d, slot length (ms) = %f, slots per KES period = %d\n", |
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.
I think this still needs to be %d
because the value is in milliseconds
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.
I need to convert it, then.
ledger/shelley/genesis.go
Outdated
@@ -35,7 +35,7 @@ type ShelleyGenesis struct { | |||
EpochLength int `json:"epochLength"` | |||
SlotsPerKESPeriod int `json:"slotsPerKESPeriod"` | |||
MaxKESEvolutions int `json:"maxKESEvolutions"` | |||
SlotLength int `json:"slotLength"` | |||
SlotLength float32 `json:"slotLength"` |
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.
We should use common.GenesisRat
for this instead. It will properly maintain the ratio instead of being lossy like float32
bbb799f
to
e8b0526
Compare
Signed-off-by: Chris Gianelloni <[email protected]>
e8b0526
to
e36fc0f
Compare
The
devnet
config.json we ship in the container uses a slot length of 0.1