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

add missing check for static peers to allow them to exceed the connection limit #6316

Merged
merged 5 commits into from
Dec 21, 2023

Conversation

pinges
Copy link
Contributor

@pinges pinges commented Dec 20, 2023

PR description

In one place there was a check missing to allow static peers to exceed the connection limit.
Another improvement is that streamBestPeers() does only return fully validated peers.

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
Copy link

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
@pinges pinges enabled auto-merge (squash) December 20, 2023 03:51
LOG.trace("Disconnected EthPeer {}", peer);
if (peer.getReputation().getScore() > USEFULL_PEER_SCORE_THRESHOLD) {
LOG.debug("Disonnected USEFULL peer {}", peer);
} else if (!LOG.isTraceEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We are checking for isTraceEnabled but logging at the debug level, should we make it a trace?

Copy link
Contributor

Choose a reason for hiding this comment

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

I missed the "!", is that on purpose? Do we log only if Trace is not enabled?

@pinges pinges disabled auto-merge December 20, 2023 04:06
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
@pinges pinges enabled auto-merge (squash) December 20, 2023 04:12
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
@pinges pinges merged commit 2cf61d6 into hyperledger:main Dec 21, 2023
18 checks passed
@pinges pinges deleted the minorPeeringChanges branch December 21, 2023 00:26
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