From fa3faa756a729b16a28f6abe2f2eb6d438026493 Mon Sep 17 00:00:00 2001 From: Piotr Macek <4007944+piotrm50@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:04:20 +0100 Subject: [PATCH] Add a comment to clarify --- pkg/retainer/retainer/retainer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/retainer/retainer/retainer.go b/pkg/retainer/retainer/retainer.go index ea4bddeb0..503533664 100644 --- a/pkg/retainer/retainer/retainer.go +++ b/pkg/retainer/retainer/retainer.go @@ -56,6 +56,7 @@ 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() } @@ -63,6 +64,7 @@ func NewProvider() module.Provider[*engine.Engine, retainer.Retainer] { 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() }