Address issue #1538.

This commit is contained in:
cheatfate 2020-10-05 11:49:20 +03:00 committed by zah
parent 67a93f558b
commit 1be3fd53b1
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ proc fetchAncestorBlocksFromNetwork(rman: RequestManager,
res = Result[void, BlockError].ok()
if res.isOk():
peer.updateScore(PeerScoreGoodBlocks)
if len(ublocks) > 0:
peer.updateScore(PeerScoreGoodBlocks)
else:
# Peer returned empty response
peer.updateScore(PeerScoreNoBlocks)
else:
# We are not penalizing other errors because of the reasons described
# above.