Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Add a comment to clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrm50 committed Jan 22, 2024
1 parent 11054ef commit fa3faa7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/retainer/retainer/retainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] {
r := New(e.Workers.CreateGroup("Retainer"),
e.Storage.Retainer,
func() iotago.SlotIndex {
// use settings in case SyncManager is not constructed yet.
if e.SyncManager == nil {
return e.Storage.Settings().LatestCommitment().Slot()
}

return e.SyncManager.LatestCommitment().Slot()
},
func() iotago.SlotIndex {
// use settings in case SyncManager is not constructed yet.
if e.SyncManager == nil {
return e.Storage.Settings().LatestFinalizedSlot()
}
Expand Down

0 comments on commit fa3faa7

Please sign in to comment.