Skip to content

Commit 66c3179

Browse files
authored
fix: add SlotState to LedgerState interface (#1176)
Signed-off-by: Aurora Gaffney <[email protected]>
1 parent 1483e8a commit 66c3179

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

internal/test/ledger/ledger.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package test_ledger
1616

1717
import (
1818
"errors"
19+
"time"
1920

2021
"github.com/blinklabs-io/gouroboros/ledger/common"
2122
)
@@ -77,3 +78,13 @@ func (ls MockLedgerState) PoolRegistration(
7778
}
7879
return ret, nil
7980
}
81+
82+
func (ls MockLedgerState) SlotToTime(slot uint64) (time.Time, error) {
83+
// TODO
84+
return time.Now(), nil
85+
}
86+
87+
func (ls MockLedgerState) TimeToSlot(t time.Time) (uint64, error) {
88+
// TODO
89+
return 0, nil
90+
}

ledger/common/state.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type CertState interface {
3535
type LedgerState interface {
3636
UtxoState
3737
CertState
38+
SlotState
3839
NetworkId() uint
3940
}
4041

0 commit comments

Comments
 (0)