Skip to content

Commit ce3912f

Browse files
authored
Merge pull request tronprotocol#1089 from tronprotocol/p2p_cfg
P2p: add active node cfg
2 parents a9f6793 + 57ae8db commit ce3912f

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

src/main/java/org/tron/core/config/args/Args.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,9 @@ public static void setParam(final String[] args, final String confFileName) {
410410
config.hasPath("node.connection.timeout") ? config.getInt("node.connection.timeout") * 1000
411411
: 0;
412412

413-
INSTANCE.activeNodes = getNodes(config, "active.node");
413+
INSTANCE.activeNodes = getNodes(config, "node.active");
414414

415-
INSTANCE.passiveNodes = getNodes(config, "passive.node");
415+
INSTANCE.passiveNodes = getNodes(config, "node.passive");
416416

417417
INSTANCE.nodeChannelReadTimeout =
418418
config.hasPath("node.channel.read.timeout") ? config.getInt("node.channel.read.timeout")

src/main/resources/config-beta.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ node {
6666

6767
maxActiveNodes = 30
6868

69+
active = [
70+
"47.93.9.236:18888",
71+
"47.93.33.201:18888",
72+
"123.56.10.6:18888",
73+
"39.107.80.135:18888",
74+
"47.93.184.2:18888"
75+
]
76+
6977
p2p {
7078
version = 102 # 47: testnet; 101: debug
7179
}
@@ -101,14 +109,6 @@ sync {
101109
node.count = 30
102110
}
103111

104-
active.node = [
105-
"47.93.9.236:18888",
106-
"47.93.33.201:18888",
107-
"123.56.10.6:18888",
108-
"39.107.80.135:18888",
109-
"47.93.184.2:18888"
110-
]
111-
112112
seed.node = {
113113
# List of the seed nodes
114114
# Seed nodes are stable full nodes

src/main/resources/config.conf

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ node {
9191
version = 10000 # 10000: mainnet; 71: testnet
9292
}
9393

94+
active = [
95+
# Active establish connection in any case
96+
# Sample entries:
97+
# "ip:port",
98+
# "ip:port"
99+
]
100+
101+
passive = [
102+
# Passive accept connection in any case
103+
# Sample entries:
104+
# "ip:port",
105+
# "ip:port"
106+
]
107+
94108
rpc {
95109
port = 50051
96110

@@ -118,19 +132,7 @@ node {
118132

119133
}
120134

121-
active.node = [
122-
# Active establish connection in any case
123-
# Sample entries:
124-
# "ip:port",
125-
# "ip:port"
126-
]
127135

128-
passive.node = [
129-
# Passive accept connection in any case
130-
# Sample entries:
131-
# "ip:port",
132-
# "ip:port"
133-
]
134136

135137
seed.node = {
136138
# List of the seed nodes

0 commit comments

Comments
 (0)