Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | wallet.reset(); | ||||
while (g_unloading_wallet_set.count(name) == 1) { | while (g_unloading_wallet_set.count(name) == 1) { | ||||
g_wallet_release_cv.wait(lock); | g_wallet_release_cv.wait(lock); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; | static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10; | ||||
std::shared_ptr<CWallet> LoadWallet(const CChainParams &chainParams, | |||||
interfaces::Chain &chain, | |||||
const WalletLocation &location, | |||||
std::string &error, std::string &warning) { | |||||
if (!CWallet::Verify(chainParams, chain, location, false, error, warning)) { | |||||
error = "Wallet file verification failed: " + error; | |||||
return nullptr; | |||||
} | |||||
std::shared_ptr<CWallet> wallet = | |||||
CWallet::CreateWalletFromFile(chainParams, chain, location); | |||||
if (!wallet) { | |||||
error = "Wallet loading failed."; | |||||
return nullptr; | |||||
} | |||||
AddWallet(wallet); | |||||
wallet->postInitProcess(); | |||||
return wallet; | |||||
} | |||||
std::shared_ptr<CWallet> LoadWallet(const CChainParams &chainParams, | |||||
interfaces::Chain &chain, | |||||
const std::string &name, std::string &error, | |||||
std::string &warning) { | |||||
return LoadWallet(chainParams, chain, WalletLocation(name), error, warning); | |||||
} | |||||
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; | ||||
const BlockHash CMerkleTx::ABANDON_HASH(uint256S( | const BlockHash CMerkleTx::ABANDON_HASH(uint256S( | ||||
"0000000000000000000000000000000000000000000000000000000000000001")); | "0000000000000000000000000000000000000000000000000000000000000001")); | ||||
/** @defgroup mapWallet | /** @defgroup mapWallet | ||||
* | * | ||||
* @{ | * @{ | ||||
▲ Show 20 Lines • Show All 4,844 Lines • Show Last 20 Lines |