mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +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)
|
ticker := time.NewTicker(time.Minute)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
head := s.readLastBlock()
|
headBlock := s.readLastBlock()
|
||||||
if head != nil && time.Since(time.Unix(int64(head.Time), 0)) > syncStateTimeWindow {
|
if headBlock != nil && time.Since(time.Unix(int64(headBlock.Time), 0)) < syncStateTimeWindow {
|
||||||
s.set(stateSynced)
|
s.set(stateSynced)
|
||||||
log.Info("Marked indexing initer as synced")
|
log.Info("Marked indexing initer as synced")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue