mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Add current-receive-addr action to wallet-tool.
This commit is contained in:
@@ -166,6 +166,7 @@ public class WalletTool {
|
|||||||
ADD_KEY,
|
ADD_KEY,
|
||||||
ADD_ADDR,
|
ADD_ADDR,
|
||||||
DELETE_KEY,
|
DELETE_KEY,
|
||||||
|
CURRENT_RECEIVE_ADDR,
|
||||||
SYNC,
|
SYNC,
|
||||||
RESET,
|
RESET,
|
||||||
SEND,
|
SEND,
|
||||||
@@ -342,6 +343,7 @@ public class WalletTool {
|
|||||||
case ADD_KEY: addKey(); break;
|
case ADD_KEY: addKey(); break;
|
||||||
case ADD_ADDR: addAddr(); break;
|
case ADD_ADDR: addAddr(); break;
|
||||||
case DELETE_KEY: deleteKey(); break;
|
case DELETE_KEY: deleteKey(); break;
|
||||||
|
case CURRENT_RECEIVE_ADDR: currentReceiveAddr(); break;
|
||||||
case RESET: reset(); break;
|
case RESET: reset(); break;
|
||||||
case SYNC: syncChain(); break;
|
case SYNC: syncChain(); break;
|
||||||
case SEND:
|
case SEND:
|
||||||
@@ -1074,6 +1076,11 @@ public class WalletTool {
|
|||||||
wallet.removeKey(key);
|
wallet.removeKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void currentReceiveAddr() {
|
||||||
|
ECKey key = wallet.currentReceiveKey();
|
||||||
|
System.out.println(key.toAddress(params) + " " + key);
|
||||||
|
}
|
||||||
|
|
||||||
private static void dumpWallet() throws BlockStoreException {
|
private static void dumpWallet() throws BlockStoreException {
|
||||||
// Setup to get the chain height so we can estimate lock times, but don't wipe the transactions if it's not
|
// Setup to get the chain height so we can estimate lock times, but don't wipe the transactions if it's not
|
||||||
// there just for the dump case.
|
// there just for the dump case.
|
||||||
|
@@ -21,6 +21,8 @@ Usage: wallet-tool --flags action-name
|
|||||||
If --lookahead-size is specified, pre-generate at least this many keys ahead of where we are.
|
If --lookahead-size is specified, pre-generate at least this many keys ahead of where we are.
|
||||||
add-addr Requires --addr to be specified, and adds it as a watching address.
|
add-addr Requires --addr to be specified, and adds it as a watching address.
|
||||||
delete-key Removes the key specified by --pubkey or --addr from the wallet.
|
delete-key Removes the key specified by --pubkey or --addr from the wallet.
|
||||||
|
current-receive-addr Prints the current receive address, deriving one if needed. Addresses derived with this action are
|
||||||
|
independent of addresses derived with the add-key action.
|
||||||
sync Sync the wallet with the latest block chain (download new transactions).
|
sync Sync the wallet with the latest block chain (download new transactions).
|
||||||
If the chain file does not exist this will RESET the wallet.
|
If the chain file does not exist this will RESET the wallet.
|
||||||
reset Deletes all transactions from the wallet, for if you want to replay the chain.
|
reset Deletes all transactions from the wallet, for if you want to replay the chain.
|
||||||
|
Reference in New Issue
Block a user