mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-22 14:22:45 +01:00
WalletTool: extract common code from dumpWallet() into printWallet()
This commit is contained in:
parent
f411dcd634
commit
0a1e1ca8a0
1 changed files with 6 additions and 2 deletions
|
@ -1255,16 +1255,20 @@ public class WalletTool implements Callable<Integer> {
|
|||
final KeyParameter aesKey = passwordToKey(true);
|
||||
if (aesKey == null)
|
||||
return; // Error message already printed.
|
||||
System.out.println(wallet.toString(dumpLookAhead, true, aesKey, true, true, chain));
|
||||
printWallet( aesKey);
|
||||
} else {
|
||||
System.err.println("Can't dump privkeys, wallet is encrypted.");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
System.out.println(wallet.toString(dumpLookAhead, dumpPrivKeys, null, true, true, chain));
|
||||
printWallet( null);
|
||||
}
|
||||
}
|
||||
|
||||
private void printWallet(@Nullable KeyParameter aesKey) {
|
||||
System.out.println(wallet.toString(dumpLookAhead, dumpPrivKeys, aesKey, true, true, chain));
|
||||
}
|
||||
|
||||
private void setCreationTime() {
|
||||
long creationTime = getCreationTimeSeconds();
|
||||
for (DeterministicKeyChain chain : wallet.getActiveKeyChains()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue