Skip to content

Commit

Permalink
BUG: continue sync
Browse files Browse the repository at this point in the history
  • Loading branch information
lochjin committed Aug 20, 2021
1 parent b66b2f7 commit 7697b77
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions p2p/synch/peersync.go
Expand Up @@ -423,15 +423,14 @@ func (ps *PeerSync) continueSync(orphan bool) {
}
bestPeer := ps.getBestPeer()
if bestPeer == nil {
ps.updateSyncPeer(true)
return
}
bgs := bestPeer.GraphState()
if bgs != nil {
if bgs.IsExcellent(spgs) {
ps.updateSyncPeer(true)
return
}
if bestPeer != sp {
ps.updateSyncPeer(true)
return
}

ps.IntellectSyncBlocks(orphan, sp)
return
}
Expand Down

0 comments on commit 7697b77

Please sign in to comment.