File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/main/java/org/tron/common/overlay/server Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 4141import org .tron .common .overlay .discover .node .Node ;
4242import org .tron .common .overlay .discover .node .NodeHandler ;
4343import org .tron .common .overlay .discover .node .NodeManager ;
44- import org .tron .common .overlay .discover .node .NodeStatistics ;
4544import org .tron .core .config .args .Args ;
4645import org .tron .core .net .peer .PeerConnection ;
4746import org .tron .core .net .peer .PeerConnectionDelegate ;
@@ -229,14 +228,6 @@ public boolean test(NodeHandler handler) {
229228 return false ;
230229 }
231230
232- if (nodesInUse != null && nodesInUse .contains (handler .getNode ().getHexId ())) {
233- return false ;
234- }
235-
236- if (handler .getNodeStatistics ().getReputation () >= NodeStatistics .REPUTATION_PREDEFINED ){
237- return true ;
238- }
239-
240231 InetAddress inetAddress = handler .getInetSocketAddress ().getAddress ();
241232 if (channelManager .getRecentlyDisconnected ().getIfPresent (inetAddress ) != null ) {
242233 return false ;
@@ -245,6 +236,10 @@ public boolean test(NodeHandler handler) {
245236 return false ;
246237 }
247238
239+ if (nodesInUse != null && nodesInUse .contains (handler .getNode ().getHexId ())) {
240+ return false ;
241+ }
242+
248243 if (nodeHandlerCache .getIfPresent (handler ) != null ) {
249244 return false ;
250245 }
You can’t perform that action at this time.
0 commit comments