Fix request manager is not penalizing peers which are failed to deliver blocks.

This commit is contained in:
cheatfate 2020-08-04 18:05:29 +03:00 committed by zah
parent 4deed117a9
commit b70462acf8
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ proc fetchAncestorBlocksFromNetwork(rman: RequestManager,
except CancelledError as exc: except CancelledError as exc:
raise exc raise exc
except CatchableError as exc: except CatchableError as exc:
peer.updateScore(PeerScoreNoBlocks)
debug "Error while fetching ancestor blocks", exc = exc.msg, debug "Error while fetching ancestor blocks", exc = exc.msg,
items = shortLog(items), peer = peer, peer_score = peer.getScore() items = shortLog(items), peer = peer, peer_score = peer.getScore()
raise exc raise exc