Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 770 Lines • ▼ Show 20 Lines | private: | ||||
std::atomic<double> m_scanning_progress{0}; | std::atomic<double> m_scanning_progress{0}; | ||||
std::mutex mutexScanning; | std::mutex mutexScanning; | ||||
friend class WalletRescanReserver; | friend class WalletRescanReserver; | ||||
WalletBatch *encrypted_batch GUARDED_BY(cs_wallet) = nullptr; | WalletBatch *encrypted_batch GUARDED_BY(cs_wallet) = nullptr; | ||||
//! the current wallet version: clients below this version are not able to | //! the current wallet version: clients below this version are not able to | ||||
//! load the wallet | //! load the wallet | ||||
int nWalletVersion = FEATURE_BASE; | int nWalletVersion GUARDED_BY(cs_wallet) = FEATURE_BASE; | ||||
//! the maximum wallet format version: memory-only variable that specifies | //! the maximum wallet format version: memory-only variable that specifies | ||||
//! to what version this wallet may be upgraded | //! to what version this wallet may be upgraded | ||||
int nWalletMaxVersion GUARDED_BY(cs_wallet) = FEATURE_BASE; | int nWalletMaxVersion GUARDED_BY(cs_wallet) = FEATURE_BASE; | ||||
int64_t nNextResend = 0; | int64_t nNextResend = 0; | ||||
int64_t nLastResend = 0; | int64_t nLastResend = 0; | ||||
bool fBroadcastTransactions = false; | bool fBroadcastTransactions = false; | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | private: | ||||
/* the HD chain data model (external chain counters) */ | /* the HD chain data model (external chain counters) */ | ||||
CHDChain hdChain; | CHDChain hdChain; | ||||
/* HD derive new child key (on internal or external chain) */ | /* HD derive new child key (on internal or external chain) */ | ||||
void DeriveNewChildKey(WalletBatch &batch, CKeyMetadata &metadata, | void DeriveNewChildKey(WalletBatch &batch, CKeyMetadata &metadata, | ||||
CKey &secret, bool internal = false) | CKey &secret, bool internal = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
std::set<int64_t> setInternalKeyPool; | std::set<int64_t> setInternalKeyPool GUARDED_BY(cs_wallet); | ||||
std::set<int64_t> setExternalKeyPool GUARDED_BY(cs_wallet); | std::set<int64_t> setExternalKeyPool GUARDED_BY(cs_wallet); | ||||
std::set<int64_t> set_pre_split_keypool; | std::set<int64_t> set_pre_split_keypool GUARDED_BY(cs_wallet); | ||||
int64_t m_max_keypool_index GUARDED_BY(cs_wallet) = 0; | int64_t m_max_keypool_index GUARDED_BY(cs_wallet) = 0; | ||||
std::map<CKeyID, int64_t> m_pool_key_to_index; | std::map<CKeyID, int64_t> m_pool_key_to_index; | ||||
std::atomic<uint64_t> m_wallet_flags{0}; | std::atomic<uint64_t> m_wallet_flags{0}; | ||||
int64_t nTimeFirstKey GUARDED_BY(cs_wallet) = 0; | int64_t nTimeFirstKey GUARDED_BY(cs_wallet) = 0; | ||||
/** | /** | ||||
* Private version of AddWatchOnly method which does not accept a timestamp, | * Private version of AddWatchOnly method which does not accept a timestamp, | ||||
▲ Show 20 Lines • Show All 545 Lines • ▼ Show 20 Lines | bool SetAddressBook(const CTxDestination &address, | ||||
const std::string &strName, const std::string &purpose); | const std::string &strName, const std::string &purpose); | ||||
bool DelAddressBook(const CTxDestination &address); | bool DelAddressBook(const CTxDestination &address); | ||||
const std::string &GetLabelName(const CScript &scriptPubKey) const | const std::string &GetLabelName(const CScript &scriptPubKey) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | ||||
// set{Ex,In}ternalKeyPool | |||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
return setInternalKeyPool.size() + setExternalKeyPool.size(); | return setInternalKeyPool.size() + setExternalKeyPool.size(); | ||||
} | } | ||||
//! signify that a particular wallet feature is now used. this may change | //! signify that a particular wallet feature is now used. this may change | ||||
//! nWalletVersion and nWalletMaxVersion if those are lower | //! nWalletVersion and nWalletMaxVersion if those are lower | ||||
void SetMinVersion(enum WalletFeature, WalletBatch *batch_in = nullptr, | void SetMinVersion(enum WalletFeature, WalletBatch *batch_in = nullptr, | ||||
bool fExplicit = false); | bool fExplicit = false); | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |