Skip to content

Commit 99dcd91

Browse files
committed
optimize trustNodeAddr
1 parent 953651d commit 99dcd91

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,12 @@ private void postProcess() {
418418
agreeNodeCount = MAX_ACTIVE_WITNESS_NUM;
419419
}
420420

421+
// dynamicConfigCheckInterval: minimum 600
421422
if (dynamicConfig.checkInterval <= 0) {
422423
dynamicConfig.checkInterval = 600;
423424
}
424425

426+
// maxTrxCacheSize: minimum 2000
425427
if (maxTrxCacheSize < 2000) {
426428
maxTrxCacheSize = 2000;
427429
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,7 @@ private static void applyNodeConfig(NodeConfig nc) {
610610
PARAMETER.maxHttpConnectNumber = nc.getMaxHttpConnectNumber();
611611
PARAMETER.netMaxTrxPerSecond = nc.getNetMaxTrxPerSecond();
612612

613-
if (StringUtils.isEmpty(PARAMETER.trustNodeAddr)) {
614-
String trustNode = nc.getTrustNode();
615-
PARAMETER.trustNodeAddr = StringUtils.isEmpty(trustNode) ? null : trustNode;
616-
}
613+
PARAMETER.trustNodeAddr = nc.getTrustNode();
617614

618615
PARAMETER.validateSignThreadNum = nc.getValidateSignThreadNum();
619616
PARAMETER.walletExtensionApi = nc.isWalletExtensionApi();

framework/src/main/java/org/tron/program/FullNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package org.tron.program;
22

33
import lombok.extern.slf4j.Slf4j;
4+
import org.apache.commons.lang3.StringUtils;
45
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
5-
import org.springframework.util.ObjectUtils;
66
import org.tron.common.application.Application;
77
import org.tron.common.application.ApplicationFactory;
88
import org.tron.common.application.TronApplicationContext;
@@ -35,7 +35,7 @@ public static void main(String[] args) {
3535
}
3636
if (parameter.isSolidityNode()) {
3737
logger.info("Solidity node is running.");
38-
if (ObjectUtils.isEmpty(parameter.getTrustNodeAddr())) {
38+
if (StringUtils.isEmpty(parameter.getTrustNodeAddr())) {
3939
throw new TronError(new IllegalArgumentException("Trust node is not set."),
4040
TronError.ErrCode.SOLID_NODE_INIT);
4141
}

0 commit comments

Comments
 (0)