mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
triedb/pathdb: fix stall condition
This commit is contained in:
parent
120b2ec7af
commit
30ad00f46b
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ func (s *initerState) update() {
|
||||||
newfhash := rawdb.ReadHeadFastBlockHash(s.disk)
|
newfhash := rawdb.ReadHeadFastBlockHash(s.disk)
|
||||||
newbhash := rawdb.ReadHeadBlockHash(s.disk)
|
newbhash := rawdb.ReadHeadBlockHash(s.disk)
|
||||||
newskeleton := rawdb.ReadSkeletonSyncStatus(s.disk)
|
newskeleton := rawdb.ReadSkeletonSyncStatus(s.disk)
|
||||||
hasProgress := newhhash.Cmp(hhash) != 0 || newfhash.Cmp(fhash) != 0 || newbhash.Cmp(bhash) != 0 || bytes.Equal(newskeleton, skeleton)
|
hasProgress := newhhash.Cmp(hhash) != 0 || newfhash.Cmp(fhash) != 0 || newbhash.Cmp(bhash) != 0 || !bytes.Equal(newskeleton, skeleton)
|
||||||
|
|
||||||
if !hasProgress && time.Since(lastProgress) > syncStalledTimeout {
|
if !hasProgress && time.Since(lastProgress) > syncStalledTimeout {
|
||||||
s.set(stateStalled)
|
s.set(stateStalled)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue