Skip to content

Commit 9247853

Browse files
authored
Merge pull request #6397 from halibobo1205/feat/command_opt
feat(*): Enrich FullNode command-line-options
2 parents c1f3956 + 21f98b4 commit 9247853

File tree

10 files changed

+39
-590
lines changed

10 files changed

+39
-590
lines changed

common/src/main/java/org/tron/common/parameter/CommonParameter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,15 @@ public class CommonParameter {
205205
//If you are running a solidity node for java tron, this flag is set to true
206206
@Getter
207207
@Setter
208+
@Parameter(names = {"--solidity"}, description = "running a solidity node for java tron")
208209
public boolean solidityNode = false;
210+
211+
//If you are running KeystoreFactory, this flag is set to true
212+
@Getter
213+
@Setter
214+
@Parameter(names = {"--keystore"}, description = "running KeystoreFactory")
215+
public boolean keystore = false;
216+
209217
@Getter
210218
@Setter
211219
public int rpcPort;

framework/build.gradle

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -212,35 +212,12 @@ startScripts.enabled = false
212212
run.enabled = false
213213
tasks.distTar.enabled = false
214214

215-
createScript(project, 'org.tron.program.SolidityNode', 'SolidityNode')
216215
createScript(project, 'org.tron.program.FullNode', 'FullNode')
217-
createScript(project, 'org.tron.program.KeystoreFactory', 'KeystoreFactory')
218-
createScript(project, 'org.tron.program.DBConvert', 'DBConvert')
219-
220216
def releaseBinary = hasProperty('binaryRelease') ? getProperty('binaryRelease') : 'true'
221-
def skipSolidity = hasProperty('skipSolidity') ? true : false
222-
def skipKeystore = hasProperty('skipKeystore') ? true : false
223-
def skipConvert = hasProperty('skipConvert') ? true : false
224-
def skipAll = hasProperty('skipAll') ? true : false
225217
if (releaseBinary == 'true') {
226218
artifacts {
227219
archives(binaryRelease('buildFullNodeJar', 'FullNode', 'org.tron.program.FullNode'))
228220
}
229-
if (!skipAll) {
230-
if (!skipSolidity) {
231-
artifacts {
232-
archives(binaryRelease('buildSolidityNodeJar', 'SolidityNode', 'org.tron.program.SolidityNode'))}
233-
}
234-
if (!skipKeystore) {
235-
artifacts {
236-
archives(binaryRelease('buildKeystoreFactoryJar', 'KeystoreFactory', 'org.tron.program.KeystoreFactory'))}
237-
}
238-
if (!skipConvert) {
239-
artifacts {
240-
archives(binaryRelease('buildDBConvertJar', 'DBConvert', 'org.tron.program.DBConvert'))}
241-
}
242-
}
243-
244221
}
245222

246223
task copyToParent(type: Copy) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ public static void clearParam() {
172172
PARAMETER.tcpNettyWorkThreadNum = 0;
173173
PARAMETER.udpNettyWorkThreadNum = 0;
174174
PARAMETER.solidityNode = false;
175+
PARAMETER.keystore = false;
175176
PARAMETER.trustNodeAddr = "";
176177
PARAMETER.walletExtensionApi = false;
177178
PARAMETER.estimateEnergy = false;
@@ -348,7 +349,7 @@ private static String getCommitIdAbbrev() {
348349

349350
private static Map<String, String[]> getOptionGroup() {
350351
String[] tronOption = new String[] {"version", "help", "shellConfFileName", "logbackPath",
351-
"eventSubscribe"};
352+
"eventSubscribe", "solidityNode", "keystore"};
352353
String[] dbOption = new String[] {"outputDirectory"};
353354
String[] witnessOption = new String[] {"witness", "privateKey"};
354355
String[] vmOption = new String[] {"debug"};

0 commit comments

Comments
 (0)