Browse Source

IsCaughtUp requires a peer

pull/176/head
Jae Kwon 9 years ago
parent
commit
9357e8ecf8
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      blockchain/pool.go

+ 5
- 0
blockchain/pool.go View File

@ -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 {


Loading…
Cancel
Save