Browse Source

Merge pull request #450 from tendermint/fix-fastsync

blockpool: fix removePeer bug
pull/439/merge
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
bd369cc451
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      blockchain/pool.go

+ 3
- 1
blockchain/pool.go View File

@ -240,7 +240,9 @@ func (pool *BlockPool) RemovePeer(peerID string) {
func (pool *BlockPool) removePeer(peerID string) { func (pool *BlockPool) removePeer(peerID string) {
for _, requester := range pool.requesters { for _, requester := range pool.requesters {
if requester.getPeerID() == peerID { if requester.getPeerID() == peerID {
pool.numPending++
if requester.getBlock() != nil {
pool.numPending++
}
go requester.redo() // pick another peer and ... go requester.redo() // pick another peer and ...
} }
} }


Loading…
Cancel
Save