Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
static const int64_t TIMESTAMP_MIN = 0; | static const int64_t TIMESTAMP_MIN = 0; | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class CChainParams; | class CChainParams; | ||||
class CCoinControl; | class CCoinControl; | ||||
class COutput; | class COutput; | ||||
class CReserveKey; | class CReserveKey; | ||||
class CScript; | class CScript; | ||||
class CScheduler; | |||||
class CTxMemPool; | class CTxMemPool; | ||||
class CWalletTx; | class CWalletTx; | ||||
/** (client) version numbers for particular wallet features */ | /** (client) version numbers for particular wallet features */ | ||||
enum WalletFeature { | enum WalletFeature { | ||||
// the earliest version new wallets supports (only useful for | // the earliest version new wallets supports (only useful for | ||||
// getwalletinfo's clientversion output) | // getwalletinfo's clientversion output) | ||||
FEATURE_BASE = 10500, | FEATURE_BASE = 10500, | ||||
▲ Show 20 Lines • Show All 585 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* A CWallet is an extension of a keystore, which also maintains a set of | * A CWallet is an extension of a keystore, which also maintains a set of | ||||
* transactions and balances, and provides the ability to create new | * transactions and balances, and provides the ability to create new | ||||
* transactions. | * transactions. | ||||
*/ | */ | ||||
class CWallet final : public CCryptoKeyStore, public CValidationInterface { | class CWallet final : public CCryptoKeyStore, public CValidationInterface { | ||||
private: | private: | ||||
static std::atomic<bool> fFlushScheduled; | |||||
std::atomic<bool> fAbortRescan; | std::atomic<bool> fAbortRescan; | ||||
// controlled by WalletRescanReserver | // controlled by WalletRescanReserver | ||||
std::atomic<bool> fScanningWallet; | std::atomic<bool> fScanningWallet; | ||||
std::mutex mutexScanning; | std::mutex mutexScanning; | ||||
friend class WalletRescanReserver; | friend class WalletRescanReserver; | ||||
WalletBatch *encrypted_batch = nullptr; | WalletBatch *encrypted_batch = nullptr; | ||||
▲ Show 20 Lines • Show All 547 Lines • ▼ Show 20 Lines | static CWallet *CreateWalletFromFile(const CChainParams &chainParams, | ||||
const std::string &name, | const std::string &name, | ||||
const fs::path &path); | const fs::path &path); | ||||
/** | /** | ||||
* Wallet post-init setup | * Wallet post-init setup | ||||
* Gives the wallet a chance to register repetitive tasks and complete | * Gives the wallet a chance to register repetitive tasks and complete | ||||
* post-init tasks | * post-init tasks | ||||
*/ | */ | ||||
void postInitProcess(CScheduler &scheduler); | void postInitProcess(); | ||||
bool BackupWallet(const std::string &strDest); | bool BackupWallet(const std::string &strDest); | ||||
/* Set the HD chain model (chain child index counters) */ | /* Set the HD chain model (chain child index counters) */ | ||||
bool SetHDChain(const CHDChain &chain, bool memonly); | bool SetHDChain(const CHDChain &chain, bool memonly); | ||||
const CHDChain &GetHDChain() const { return hdChain; } | const CHDChain &GetHDChain() const { return hdChain; } | ||||
/* Returns true if HD is enabled */ | /* Returns true if HD is enabled */ | ||||
▲ Show 20 Lines • Show All 155 Lines • Show Last 20 Lines |