@@ -741,12 +741,6 @@ public static void setParam(final String[] args, final String confFileName) {
741741 config .hasPath ("node.connection.timeout" ) ? config .getInt ("node.connection.timeout" ) * 1000
742742 : 0 ;
743743
744- INSTANCE .activeNodes = getNodes (config , "node.active" );
745-
746- INSTANCE .passiveNodes = getNodes (config , "node.passive" );
747-
748- INSTANCE .fastForwardNodes = getNodes (config , "node.fastForward" );
749-
750744 INSTANCE .nodeChannelReadTimeout =
751745 config .hasPath ("node.channel.read.timeout" ) ? config .getInt ("node.channel.read.timeout" )
752746 : 0 ;
@@ -951,6 +945,12 @@ public static void setParam(final String[] args, final String confFileName) {
951945 .getInt ("node.validContractProto.threads" )
952946 : Runtime .getRuntime ().availableProcessors ();
953947
948+ INSTANCE .activeNodes = getNodes (config , "node.active" );
949+
950+ INSTANCE .passiveNodes = getNodes (config , "node.passive" );
951+
952+ INSTANCE .fastForwardNodes = getNodes (config , "node.fastForward" );
953+
954954 initBackupProperty (config );
955955 if ("ROCKSDB" .equals (Args .getInstance ().getStorage ().getDbEngine ().toUpperCase ())) {
956956 initRocksDbBackupProperty (config );
@@ -1026,7 +1026,12 @@ private static List<Node> getNodes(final com.typesafe.config.Config config, Stri
10261026 List <String > list = config .getStringList (path );
10271027 for (String configString : list ) {
10281028 Node n = Node .instanceOf (configString );
1029- ret .add (n );
1029+ if (!(INSTANCE .nodeDiscoveryBindIp .equals (n .getHost ()) ||
1030+ INSTANCE .nodeExternalIp .equals (n .getHost ()) ||
1031+ "127.0.0.1" .equals (n .getHost ())) ||
1032+ INSTANCE .nodeListenPort != n .getPort ()) {
1033+ ret .add (n );
1034+ }
10301035 }
10311036 return ret ;
10321037 }
@@ -1321,6 +1326,7 @@ private static void logConfig() {
13211326 logger .info ("Discover enable: {}" , args .isNodeDiscoveryEnable ());
13221327 logger .info ("Active node size: {}" , args .getActiveNodes ().size ());
13231328 logger .info ("Passive node size: {}" , args .getPassiveNodes ().size ());
1329+ logger .info ("FastForward node size: {}" , args .getFastForwardNodes ().size ());
13241330 logger .info ("Seed node size: {}" , args .getSeedNode ().getIpList ().size ());
13251331 logger .info ("Max connection: {}" , args .getNodeMaxActiveNodes ());
13261332 logger .info ("Max connection with same IP: {}" , args .getNodeMaxActiveNodesWithSameIp ());
0 commit comments