-
Notifications
You must be signed in to change notification settings - Fork 812
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
Conversation
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
|
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthPeers.java
Outdated
Show resolved
Hide resolved
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthPeers.java
Outdated
Show resolved
Hide resolved
ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthPeers.java
Show resolved
Hide resolved
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/peers/PeerPrivileges.java
Outdated
Show resolved
Hide resolved
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
LOG.trace("Disconnected EthPeer {}", peer); | ||
if (peer.getReputation().getScore() > USEFULL_PEER_SCORE_THRESHOLD) { | ||
LOG.debug("Disonnected USEFULL peer {}", peer); | ||
} else if (!LOG.isTraceEnabled()) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
Signed-off-by: stefan.pingel@consensys.net <stefan.pingel@consensys.net>
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.