Merge pull request #450 from tendermint/fix-fastsync

blockpool: fix removePeer bug
This commit is contained in:
Ethan Buchman 2017-04-18 22:21:10 -04:00 committed by GitHub
commit bd369cc451
1 changed files with 3 additions and 1 deletions

View File

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