Change printed format of the wallet to be less verbose and make wallet-tool not dump privkeys by default.

This commit is contained in:
Mike Hearn
2014-08-11 18:19:24 +02:00
parent e8ba287029
commit 90492b61f7
5 changed files with 42 additions and 12 deletions

View File

@@ -222,6 +222,7 @@ public class WalletTool {
OptionSpec<String> paymentRequestLocation = parser.accepts("payment-request").withRequiredArg();
parser.accepts("no-pki");
parser.accepts("tor");
parser.accepts("dump-privkeys");
options = parser.parse(args);
final String HELP_TEXT = Resources.toString(WalletTool.class.getResource("wallet-tool-help.txt"), Charsets.UTF_8);
@@ -1057,6 +1058,6 @@ public class WalletTool {
// there just for the dump case.
if (chainFileName.exists())
setup();
System.out.println(wallet.toString(true, true, true, chain));
System.out.println(wallet.toString(options.has("dump-privkeys"), true, true, chain));
}
}

View File

@@ -4,7 +4,8 @@ Usage: wallet-tool --flags action-name
wallet-tool action-name --flags
>>> ACTIONS
dump Loads and prints the given wallet in textual form to stdout.
dump Loads and prints the given wallet in textual form to stdout. Private keys are only printed
if --dump-privkeys is specified.
raw-dump Prints the wallet as a raw protobuf with no parsing or sanity checking applied.
create Makes a new wallet in the file specified by --wallet.
Will complain and require --force if the wallet already exists.