From d7bed7dac432f4a7a8f451b5597151afd2de1d1b Mon Sep 17 00:00:00 2001 From: jeffyanta Date: Thu, 5 Mar 2026 13:06:45 -0500 Subject: [PATCH] Reduce backup reprocessing of accounts for external deposits --- ocp/rpc/account/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocp/rpc/account/server.go b/ocp/rpc/account/server.go index 34cafdf..72a8f64 100644 --- a/ocp/rpc/account/server.go +++ b/ocp/rpc/account/server.go @@ -273,7 +273,7 @@ func (s *server) GetTokenAccountInfos(ctx context.Context, req *accountpb.GetTok ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond) defer cancel() - if records.General.AccountType == commonpb.AccountType_PRIMARY && !records.General.RequiresDepositSync { + if records.General.AccountType == commonpb.AccountType_PRIMARY && !records.General.RequiresDepositSync && time.Since(records.General.DepositsLastSyncedAt) > 5*time.Minute { records.General.RequiresDepositSync = true err = s.data.UpdateAccountInfo(ctx, records.General) if err != nil {