From 9fdb2c341fc9ced2e545bcf47df77cc5f737b64c Mon Sep 17 00:00:00 2001 From: benjamin <ben@elixxir.io> Date: Tue, 25 Oct 2022 12:26:29 -0700 Subject: [PATCH] fixed how bounds for when to generate historical identities are created --- cmix/identity/tracker.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmix/identity/tracker.go b/cmix/identity/tracker.go index b0f7ca587..2f4494c39 100644 --- a/cmix/identity/tracker.go +++ b/cmix/identity/tracker.go @@ -151,6 +151,11 @@ func (t *manager) AddIdentityWithHistory(id *id.ID, validUntil, historicalBeginn historicalBeginning = retention } + if now := time.Now(); historicalBeginning.After(now) || + now.Sub(historicalBeginning) < 1*time.Minute { + historicalBeginning = now.Add(-1 * time.Minute) + } + t.newIdentity <- TrackedID{ NextGeneration: netTime.Now().Add(-time.Second), LastGeneration: historicalBeginning, -- GitLab