Skip to content

Commit 71c1ae1

Browse files
committed
fix(config): replace external.ip=null with empty string in test configs
ConfigBeanFactory cannot bind HOCON null to String fields. Replace external.ip=null with external.ip="" in 3 test config files. Empty string has same semantics (no external IP configured). This allows DiscoveryConfig sub-bean to auto-bind correctly.
1 parent 5893ee1 commit 71c1ae1

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

common/src/main/java/org/tron/core/config/args/NodeConfig.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ public class NodeConfig {
5959

6060
public boolean isDiscoveryEnable() { return discovery.isEnable(); }
6161
public boolean isDiscoveryPersist() { return discovery.isPersist(); }
62-
public String getDiscoveryExternalIp() {
63-
return discovery.getExternal().getIp();
64-
}
62+
public String getDiscoveryExternalIp() { return discovery.getExternal().getIp(); }
6563
public String getShutdownBlockTime() { return shutdownBlockTime; }
6664
public long getShutdownBlockHeight() { return shutdownBlockHeight; }
6765
public long getShutdownBlockCount() { return shutdownBlockCount; }

framework/src/test/resources/config-localtest.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ storage {
5757
node.discovery = {
5858
enable = true
5959
persist = true
60-
external.ip = null
60+
external.ip = ""
6161
}
6262

6363
node.backup {

framework/src/test/resources/config-test-dbbackup.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ storage {
6060
node.discovery = {
6161
enable = true
6262
persist = true
63-
external.ip = null
63+
external.ip = ""
6464
}
6565

6666
node.backup {

framework/src/test/resources/config-test-index.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ storage {
5454
node.discovery = {
5555
enable = true
5656
persist = true
57-
external.ip = null
57+
external.ip = ""
5858
}
5959

6060
node {

0 commit comments

Comments
 (0)