mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-23 15:14:32 +00:00
triedb/pathdb: fix synced condition
This commit is contained in:
parent
30ad00f46b
commit
07b1c36ad9
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue