taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit 11a2802df98903b635140abb942e73e26c8de652
parent 4f538f73f7f359b1d1e6af3d1fda94c11761bd34
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Tue, 27 Oct 2026 13:20:02 +0100

attempt to fix duration after validation

Diffstat:
Mpkg/taldir/taldir.go | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pkg/taldir/taldir.go b/pkg/taldir/taldir.go @@ -408,7 +408,7 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) { return } entry.HsAlias = saltHAlias(validation.HAlias, t.Salt) - tmpDuration := (entry.Duration + validation.Duration) * 1000 + aggregatedDuration := entry.Duration + validation.Duration err = t.DB.GetEntryByHsAlias(&entry, entry.HsAlias) if err == nil { if validation.TargetURI == "" { @@ -422,7 +422,7 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) { t.disseminateStop(entry) } else { entry.TargetURI = validation.TargetURI - entry.Duration = tmpDuration + entry.Duration = aggregatedDuration err = t.DB.UpdateEntry(&entry) t.Logger.Logf(LogDebug, "Updated entry in database to: %v", entry) if err != nil { @@ -438,6 +438,7 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) { t.Logger.Logf(LogWarning, "Validated a deletion request but no entry found for `%s'\n", entry.HsAlias) } else { entry.TargetURI = validation.TargetURI + entry.Duration = aggregatedDuration err = t.DB.InsertEntry(&entry) if err != nil { t.Logger.Logf(LogError, "Error inserting entry: %v", err)