Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | std::shared_ptr<CWallet> LoadWallet(const CChainParams &chainParams, | ||||
interfaces::Chain &chain, | interfaces::Chain &chain, | ||||
const std::string &name, std::string &error, | const std::string &name, std::string &error, | ||||
std::string &warning) { | std::string &warning) { | ||||
return LoadWallet(chainParams, chain, WalletLocation(name), error, warning); | return LoadWallet(chainParams, chain, WalletLocation(name), error, warning); | ||||
} | } | ||||
std::shared_ptr<CWallet> | std::shared_ptr<CWallet> | ||||
CreateWallet(const CChainParams ¶ms, interfaces::Chain &chain, | CreateWallet(const CChainParams ¶ms, interfaces::Chain &chain, | ||||
const SecureString &passphrase, uint64_t wallet_creation_flags, | |||||
const std::string &name, std::string &error, std::string &warning, | const std::string &name, std::string &error, std::string &warning, | ||||
WalletCreationStatus &status, const SecureString &passphrase, | WalletCreationStatus &status) { | ||||
uint64_t wallet_creation_flags) { | |||||
// Indicate that the wallet is actually supposed to be blank and not just | // Indicate that the wallet is actually supposed to be blank and not just | ||||
// blank to make it encrypted | // blank to make it encrypted | ||||
bool create_blank = (wallet_creation_flags & WALLET_FLAG_BLANK_WALLET); | bool create_blank = (wallet_creation_flags & WALLET_FLAG_BLANK_WALLET); | ||||
// Born encrypted wallets need to be created blank first. | // Born encrypted wallets need to be created blank first. | ||||
if (!passphrase.empty()) { | if (!passphrase.empty()) { | ||||
wallet_creation_flags |= WALLET_FLAG_BLANK_WALLET; | wallet_creation_flags |= WALLET_FLAG_BLANK_WALLET; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 5,253 Lines • Show Last 20 Lines |