aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-07-10 13:51:20 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-07-10 13:51:25 -0400
commit4fcccdac785e09ad5627b3bf4811dfba353693e8 (patch)
tree882edf6c5fb72f1f7efeea0071367f3b4ebf1fca /src/wallet/wallet.h
parentff0aad8a40a01da3f9031c7c583cb489cc5c8c57 (diff)
parent1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d (diff)
downloadbitcoin-4fcccdac785e09ad5627b3bf4811dfba353693e8.tar.xz
Merge #16244: Move wallet creation out of the createwallet rpc into its own function
1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d Move wallet creation out of the createwallet rpc into its own function (Andrew Chow) Pull request description: Moves the wallet creation logic from within the `createwallet` rpc and into its own function within wallet.cpp. ACKs for top commit: jnewbery: ACK 1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d MarcoFalke: ACK 1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d Sjors: ACK 1aecdf2 with some suggestions for followup. Tree-SHA512: 8d26d7ff48db4f8fac12408a5a294f788b7f50a72e7eb4008fb74ff14d7400eb3970f8038a19f989eff55198fc11c0cf86f52231c62b9015eb777132edc8ea88
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 14c373bddf..7e2230554d 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -49,6 +49,14 @@ std::vector<std::shared_ptr<CWallet>> GetWallets();
std::shared_ptr<CWallet> GetWallet(const std::string& name);
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocation& location, std::string& error, std::string& warning);
+enum WalletCreationStatus {
+ SUCCESS,
+ CREATION_FAILED,
+ ENCRYPTION_FAILED
+};
+
+std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags);
+
//! Default for -keypool
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000;
//! -paytxfee default