Skip to content

Commit 68773e3

Browse files
authored
feat(cli): change newly added "--keystore" parameter to "--keystore-factory" (#6446)
The "--keystore" parameter name could be misleading, as it typically refers to encrypted key storage files or wallets, while this parameter actually runs a KeystoreFactory. The new name "--keystore-factory" makes the parameter's purpose more explicit and avoids potential confusion.
1 parent ba5f70e commit 68773e3

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ public class CommonParameter {
211211
//If you are running KeystoreFactory, this flag is set to true
212212
@Getter
213213
@Setter
214-
@Parameter(names = {"--keystore"}, description = "running KeystoreFactory")
215-
public boolean keystore = false;
214+
@Parameter(names = {"--keystore-factory"}, description = "running KeystoreFactory")
215+
public boolean keystoreFactory = false;
216216

217217
@Getter
218218
@Setter

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static void clearParam() {
168168
PARAMETER.tcpNettyWorkThreadNum = 0;
169169
PARAMETER.udpNettyWorkThreadNum = 0;
170170
PARAMETER.solidityNode = false;
171-
PARAMETER.keystore = false;
171+
PARAMETER.keystoreFactory = false;
172172
PARAMETER.trustNodeAddr = "";
173173
PARAMETER.walletExtensionApi = false;
174174
PARAMETER.estimateEnergy = false;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void main(String[] args) {
3030
SolidityNode.start();
3131
return;
3232
}
33-
if (parameter.isKeystore()) {
33+
if (parameter.isKeystoreFactory()) {
3434
KeystoreFactory.start();
3535
return;
3636
}

framework/src/test/java/org/tron/core/config/args/ArgsTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public void destroy() {
5757

5858
@Test
5959
public void get() {
60-
Args.setParam(new String[] {"-c", Constant.TEST_CONF, "--keystore"}, Constant.TESTNET_CONF);
60+
Args.setParam(new String[] {"-c", Constant.TEST_CONF, "--keystore-factory"},
61+
Constant.TESTNET_CONF);
6162

6263
CommonParameter parameter = Args.getInstance();
6364

@@ -128,7 +129,7 @@ public void get() {
128129
ByteArray.toHexString(Args.getLocalWitnesses()
129130
.getWitnessAccountAddress()));
130131

131-
Assert.assertTrue(parameter.isKeystore());
132+
Assert.assertTrue(parameter.isKeystoreFactory());
132133
}
133134

134135
@Test

0 commit comments

Comments
 (0)