mirror of
https://github.com/btcsuite/btcd.git
synced 2025-03-15 04:11:37 +01:00
Merge aace7a9d0f
into 6afce8d608
This commit is contained in:
commit
73a339b2e8
1 changed files with 5 additions and 0 deletions
|
@ -309,6 +309,11 @@ func (sm *SyncManager) startSync() {
|
||||||
higherPeers = append(higherPeers, peer)
|
higherPeers = append(higherPeers, peer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if sm.chain.IsCurrent() && len(higherPeers) == 0 {
|
||||||
|
log.Infof("Caught up to block %s(%d)", best.Hash.String(), best.Height)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Pick randomly from the set of peers greater than our block height,
|
// Pick randomly from the set of peers greater than our block height,
|
||||||
// falling back to a random peer of the same height if none are greater.
|
// falling back to a random peer of the same height if none are greater.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue