Skip to content

Commit bbb799f

Browse files
committed
fix: slot length is a float
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent a6c4a3b commit bbb799f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

cmd/gouroboros/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func testQuery(f *globalFlags) {
140140
fmt.Printf("era-history:\n")
141141
for eraId, era := range eraHistory {
142142
fmt.Printf(
143-
"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",
143+
"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",
144144
eraId,
145145
era.Begin.SlotNo,
146146
era.Begin.EpochNo,

ledger/shelley/genesis.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Blink Labs Software
1+
// Copyright 2025 Blink Labs Software
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ type ShelleyGenesis struct {
3535
EpochLength int `json:"epochLength"`
3636
SlotsPerKESPeriod int `json:"slotsPerKESPeriod"`
3737
MaxKESEvolutions int `json:"maxKESEvolutions"`
38-
SlotLength int `json:"slotLength"`
38+
SlotLength float32 `json:"slotLength"`
3939
UpdateQuorum int `json:"updateQuorum"`
4040
MaxLovelaceSupply uint64 `json:"maxLovelaceSupply"`
4141
ProtocolParameters ShelleyGenesisProtocolParams `json:"protocolParams"`

ledger/shelley/genesis_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Blink Labs Software
1+
// Copyright 2025 Blink Labs Software
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

protocol/localstatequery/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func TestGenesisConfigJSON(t *testing.T) {
302302
EpochLength: 432000,
303303
SlotsPerKESPeriod: 129600,
304304
MaxKESEvolutions: 62,
305-
SlotLength: 1,
305+
SlotLength: 0.1,
306306
UpdateQuorum: 5,
307307
MaxLovelaceSupply: 45000000000000000,
308308
ProtocolParams: localstatequery.GenesisConfigResultProtocolParameters{

protocol/localstatequery/queries.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Blink Labs Software
1+
// Copyright 2025 Blink Labs Software
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -495,7 +495,7 @@ type eraHistoryResultParams struct {
495495
// Tells the CBOR decoder to convert to/from a struct and a CBOR array
496496
_ struct{} `cbor:",toarray"`
497497
EpochLength int
498-
SlotLength int
498+
SlotLength float32
499499
SlotsPerKESPeriod struct {
500500
// Tells the CBOR decoder to convert to/from a struct and a CBOR array
501501
_ struct{} `cbor:",toarray"`
@@ -623,7 +623,7 @@ type GenesisConfigResult struct {
623623
EpochLength int
624624
SlotsPerKESPeriod int
625625
MaxKESEvolutions int
626-
SlotLength int
626+
SlotLength float32
627627
UpdateQuorum int
628628
MaxLovelaceSupply int64
629629
ProtocolParams GenesisConfigResultProtocolParameters

0 commit comments

Comments
 (0)