3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 02:05:53 +00:00

Rename wallet-tool option --net=PROD to --net=MAIN. PROD can still be used as an alias to MAIN.

The mainnet blockchain file is renamed to mainnet.chain.
This commit is contained in:
Andreas Schildbach 2014-11-01 15:29:31 +01:00
parent 3aac4b0025
commit e9f016b753
2 changed files with 6 additions and 4 deletions

View File

@ -180,7 +180,8 @@ public class WalletTool {
} }
public enum NetworkEnum { public enum NetworkEnum {
PROD, MAIN,
PROD, // alias for MAIN
TEST, TEST,
REGTEST REGTEST
} }
@ -198,7 +199,7 @@ public class WalletTool {
OptionSpec<String> walletFileName = parser.accepts("wallet").withRequiredArg().defaultsTo("wallet"); OptionSpec<String> walletFileName = parser.accepts("wallet").withRequiredArg().defaultsTo("wallet");
seedFlag = parser.accepts("seed").withRequiredArg(); seedFlag = parser.accepts("seed").withRequiredArg();
watchFlag = parser.accepts("watchkey").withRequiredArg(); watchFlag = parser.accepts("watchkey").withRequiredArg();
OptionSpec<NetworkEnum> netFlag = parser.accepts("net").withOptionalArg().ofType(NetworkEnum.class).defaultsTo(NetworkEnum.PROD); OptionSpec<NetworkEnum> netFlag = parser.accepts("net").withOptionalArg().ofType(NetworkEnum.class).defaultsTo(NetworkEnum.MAIN);
dateFlag = parser.accepts("date").withRequiredArg().ofType(Date.class) dateFlag = parser.accepts("date").withRequiredArg().ofType(Date.class)
.withValuesConvertedBy(DateConverter.datePattern("yyyy/MM/dd")); .withValuesConvertedBy(DateConverter.datePattern("yyyy/MM/dd"));
OptionSpec<WaitForEnum> waitForFlag = parser.accepts("waitfor").withRequiredArg().ofType(WaitForEnum.class); OptionSpec<WaitForEnum> waitForFlag = parser.accepts("waitfor").withRequiredArg().ofType(WaitForEnum.class);
@ -255,9 +256,10 @@ public class WalletTool {
logger.setLevel(Level.SEVERE); logger.setLevel(Level.SEVERE);
} }
switch (netFlag.value(options)) { switch (netFlag.value(options)) {
case MAIN:
case PROD: case PROD:
params = MainNetParams.get(); params = MainNetParams.get();
chainFileName = new File("prodnet.chain"); chainFileName = new File("mainnet.chain");
break; break;
case TEST: case TEST:
params = TestNet3Params.get(); params = TestNet3Params.get();

View File

@ -55,7 +55,7 @@ Usage: wallet-tool --flags action-name
>>> GENERAL OPTIONS >>> GENERAL OPTIONS
--debuglog Enables logging from the core library. --debuglog Enables logging from the core library.
--net=XXX Which network to connect to, defaults to PROD, can also be TEST or REGTEST. --net=XXX Which network to connect to, defaults to MAIN, can also be TEST or REGTEST.
--mode=FULL/SPV Whether to do full verification of the chain or just light mode. --mode=FULL/SPV Whether to do full verification of the chain or just light mode.
--wallet=<file> Specifies what wallet file to load and save. --wallet=<file> Specifies what wallet file to load and save.
--chain=<file> Specifies the name of the file that stores the block chain. --chain=<file> Specifies the name of the file that stores the block chain.