File tree Expand file tree Collapse file tree
framework/src/main/java/org/tron/core/net/peer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757@ Scope ("prototype" )
5858public class PeerConnection {
5959
60- private static List <InetSocketAddress > relayNodes = Args .getInstance ().getFastForwardNodes ();
61-
6260 @ Getter
6361 private PeerStatistics peerStatistics = new PeerStatistics ();
6462
@@ -166,7 +164,9 @@ public class PeerConnection {
166164
167165 public void setChannel (Channel channel ) {
168166 this .channel = channel ;
169- if (relayNodes .stream ().anyMatch (n -> n .getAddress ().equals (channel .getInetAddress ()))) {
167+ List <InetSocketAddress > relayNodes = Args .getInstance ().getFastForwardNodes ();
168+ if (relayNodes != null
169+ && relayNodes .stream ().anyMatch (n -> n .getAddress ().equals (channel .getInetAddress ()))) {
170170 this .isRelayPeer = true ;
171171 }
172172 this .nodeStatistics = TronStatsManager .getNodeStatistics (channel .getInetAddress ());
You can’t perform that action at this time.
0 commit comments