Skip to content

Conversation

@blacktemplar
Copy link
Contributor

Issue Addressed

NA

Proposed Changes

Currently a banned peer will remain banned indefinitely as long as update is called on the score struct regularly. This fixes this bug and the score decay starts after BANNED_BEFORE_DECAY seconds after banning.

Copy link
Member

@AgeManning AgeManning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Although I should change the naming and the comments around MIN_SCORE_BEFORE_BANNED. Because the comments imply that if we are at that score we are not banned. But in fact we become banned at that score.

@AgeManning
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Oct 29, 2020
## Issue Addressed

NA

## Proposed Changes

Currently a banned peer will remain banned indefinitely as long as update is called on the score struct regularly. This fixes this bug and the score decay starts after `BANNED_BEFORE_DECAY` seconds after banning.
@bors
Copy link

bors bot commented Oct 29, 2020

@bors bors bot changed the title fix unbanning of peers [Merged by Bors] - fix unbanning of peers Oct 29, 2020
@bors bors bot closed this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants