From 07b1c36ad9d26f9ba29c2c9ab17af3734f52342e Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 5 Mar 2026 12:11:12 +0800 Subject: [PATCH] triedb/pathdb: fix synced condition --- triedb/pathdb/history_indexer_state.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triedb/pathdb/history_indexer_state.go b/triedb/pathdb/history_indexer_state.go index b7887fc642..871f703c5a 100644 --- a/triedb/pathdb/history_indexer_state.go +++ b/triedb/pathdb/history_indexer_state.go @@ -98,8 +98,8 @@ func (s *initerState) update() { ticker := time.NewTicker(time.Minute) defer ticker.Stop() - head := s.readLastBlock() - if head != nil && time.Since(time.Unix(int64(head.Time), 0)) > syncStateTimeWindow { + headBlock := s.readLastBlock() + if headBlock != nil && time.Since(time.Unix(int64(headBlock.Time), 0)) < syncStateTimeWindow { s.set(stateSynced) log.Info("Marked indexing initer as synced") } else {