mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-23 17:20:33 +00:00
IsCaughtUp requires a peer
This commit is contained in:
@@ -130,6 +130,11 @@ func (pool *BlockPool) IsCaughtUp() bool {
|
||||
height := pool.height
|
||||
pool.mtx.Unlock()
|
||||
|
||||
// Need at least 1 peer to be considered caught up.
|
||||
if len(pool.peers) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
pool.peersMtx.Lock()
|
||||
maxPeerHeight := 0
|
||||
for _, peer := range pool.peers {
|
||||
|
||||
Reference in New Issue
Block a user