@@ -741,12 +741,6 @@ public static void setParam(final String[] args, final String confFileName) {
741
741
config .hasPath ("node.connection.timeout" ) ? config .getInt ("node.connection.timeout" ) * 1000
742
742
: 0 ;
743
743
744
- INSTANCE .activeNodes = getNodes (config , "node.active" );
745
-
746
- INSTANCE .passiveNodes = getNodes (config , "node.passive" );
747
-
748
- INSTANCE .fastForwardNodes = getNodes (config , "node.fastForward" );
749
-
750
744
INSTANCE .nodeChannelReadTimeout =
751
745
config .hasPath ("node.channel.read.timeout" ) ? config .getInt ("node.channel.read.timeout" )
752
746
: 0 ;
@@ -951,6 +945,12 @@ public static void setParam(final String[] args, final String confFileName) {
951
945
.getInt ("node.validContractProto.threads" )
952
946
: Runtime .getRuntime ().availableProcessors ();
953
947
948
+ INSTANCE .activeNodes = getNodes (config , "node.active" );
949
+
950
+ INSTANCE .passiveNodes = getNodes (config , "node.passive" );
951
+
952
+ INSTANCE .fastForwardNodes = getNodes (config , "node.fastForward" );
953
+
954
954
initBackupProperty (config );
955
955
if ("ROCKSDB" .equals (Args .getInstance ().getStorage ().getDbEngine ().toUpperCase ())) {
956
956
initRocksDbBackupProperty (config );
@@ -1026,7 +1026,12 @@ private static List<Node> getNodes(final com.typesafe.config.Config config, Stri
1026
1026
List <String > list = config .getStringList (path );
1027
1027
for (String configString : list ) {
1028
1028
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
+ }
1030
1035
}
1031
1036
return ret ;
1032
1037
}
@@ -1321,6 +1326,7 @@ private static void logConfig() {
1321
1326
logger .info ("Discover enable: {}" , args .isNodeDiscoveryEnable ());
1322
1327
logger .info ("Active node size: {}" , args .getActiveNodes ().size ());
1323
1328
logger .info ("Passive node size: {}" , args .getPassiveNodes ().size ());
1329
+ logger .info ("FastForward node size: {}" , args .getFastForwardNodes ().size ());
1324
1330
logger .info ("Seed node size: {}" , args .getSeedNode ().getIpList ().size ());
1325
1331
logger .info ("Max connection: {}" , args .getNodeMaxActiveNodes ());
1326
1332
logger .info ("Max connection with same IP: {}" , args .getNodeMaxActiveNodesWithSameIp ());
0 commit comments