Fix sync_manager.nim not rewarding peers for good responses. (#1660)

This commit is contained in:
Eugene Kabanov 2020-09-16 10:15:06 +03:00 committed by Mamy Ratsimbazafy
parent a89294b21f
commit 6f8ddd1787
1 changed files with 2 additions and 0 deletions

View File

@ -462,6 +462,8 @@ proc push*[T](sq: SyncQueue[T], sr: SyncRequest[T],
if res.isOk: if res.isOk:
sq.outSlot = sq.outSlot + item.request.count sq.outSlot = sq.outSlot + item.request.count
# If there no error we should reward peer with some bonus score.
item.request.item.updateScore(PeerScoreGoodBlocks)
sq.wakeupWaiters() sq.wakeupWaiters()
else: else:
debug "Block pool rejected peer's response", peer = item.request.item, debug "Block pool rejected peer's response", peer = item.request.item,