Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - handle peer state transitions on gossipsub score changes + refactoring #1892

Conversation

blacktemplar
Copy link
Contributor

Issue Addressed

NA

Proposed Changes

Correctly handles peer state transitions on gossipsub changes + refactors handling of peer state transitions into one function used for lighthouse score changes and gossipsub score changes.

&mut self.events,
&self.log,
);
if previous_state == info.score_state() {
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a != ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No this should really be an ==. It was the else branch in the original code. Basically we log already a line inside handle_score_transitions if the state changed. This line here is to log that the score changed if the state didn't change.

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.

Updated

@AgeManning
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Nov 13, 2020
#1892)

## Issue Addressed

NA

## Proposed Changes

Correctly handles peer state transitions on gossipsub changes + refactors handling of peer state transitions into one function used for lighthouse score changes and gossipsub score changes.


Co-authored-by: Age Manning <[email protected]>
@bors bors bot changed the title handle peer state transitions on gossipsub score changes + refactoring [Merged by Bors] - handle peer state transitions on gossipsub score changes + refactoring Nov 13, 2020
@bors bors bot closed this Nov 13, 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