Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 866 Lines • ▼ Show 20 Lines | public: | ||||
std::map<TxId, CWalletTx> mapWallet GUARDED_BY(cs_wallet); | std::map<TxId, CWalletTx> mapWallet GUARDED_BY(cs_wallet); | ||||
typedef std::multimap<int64_t, CWalletTx *> TxItems; | typedef std::multimap<int64_t, CWalletTx *> TxItems; | ||||
TxItems wtxOrdered; | TxItems wtxOrdered; | ||||
int64_t nOrderPosNext GUARDED_BY(cs_wallet) = 0; | int64_t nOrderPosNext GUARDED_BY(cs_wallet) = 0; | ||||
uint64_t nAccountingEntryNumber = 0; | uint64_t nAccountingEntryNumber = 0; | ||||
std::map<CTxDestination, CAddressBookData> mapAddressBook; | std::map<CTxDestination, CAddressBookData> | ||||
mapAddressBook GUARDED_BY(cs_wallet); | |||||
std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet); | std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet); | ||||
/** Registered interfaces::Chain::Notifications handler. */ | /** Registered interfaces::Chain::Notifications handler. */ | ||||
std::unique_ptr<interfaces::Handler> m_chain_notifications_handler; | std::unique_ptr<interfaces::Handler> m_chain_notifications_handler; | ||||
/** Register the wallet for chain notifications */ | /** Register the wallet for chain notifications */ | ||||
void handleNotifications(); | void handleNotifications(); | ||||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | public: | ||||
//! LoadWallet) | //! LoadWallet) | ||||
bool LoadCryptedKey(const CPubKey &vchPubKey, | bool LoadCryptedKey(const CPubKey &vchPubKey, | ||||
const std::vector<uint8_t> &vchCryptedSecret); | const std::vector<uint8_t> &vchCryptedSecret); | ||||
bool AddCScript(const CScript &redeemScript) override; | bool AddCScript(const CScript &redeemScript) override; | ||||
bool LoadCScript(const CScript &redeemScript); | bool LoadCScript(const CScript &redeemScript); | ||||
//! Adds a destination data tuple to the store, and saves it to disk | //! Adds a destination data tuple to the store, and saves it to disk | ||||
bool AddDestData(const CTxDestination &dest, const std::string &key, | bool AddDestData(const CTxDestination &dest, const std::string &key, | ||||
const std::string &value); | const std::string &value) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
//! Erases a destination data tuple in the store and on disk | //! Erases a destination data tuple in the store and on disk | ||||
bool EraseDestData(const CTxDestination &dest, const std::string &key); | bool EraseDestData(const CTxDestination &dest, const std::string &key) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
//! Adds a destination data tuple to the store, without saving it to disk | //! Adds a destination data tuple to the store, without saving it to disk | ||||
void LoadDestData(const CTxDestination &dest, const std::string &key, | void LoadDestData(const CTxDestination &dest, const std::string &key, | ||||
const std::string &value); | const std::string &value) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
//! Look up a destination data tuple in the store, return true if found | //! Look up a destination data tuple in the store, return true if found | ||||
//! false otherwise | //! false otherwise | ||||
bool GetDestData(const CTxDestination &dest, const std::string &key, | bool GetDestData(const CTxDestination &dest, const std::string &key, | ||||
std::string *value) const; | std::string *value) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
//! Get all destination values matching a prefix. | //! Get all destination values matching a prefix. | ||||
std::vector<std::string> GetDestValues(const std::string &prefix) const; | std::vector<std::string> GetDestValues(const std::string &prefix) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
//! Adds a watch-only address to the store, and saves it to disk. | //! Adds a watch-only address to the store, and saves it to disk. | ||||
bool AddWatchOnly(const CScript &dest, int64_t nCreateTime) | bool AddWatchOnly(const CScript &dest, int64_t nCreateTime) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
bool RemoveWatchOnly(const CScript &dest) override | bool RemoveWatchOnly(const CScript &dest) override | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
//! Adds a watch-only address to the store, without saving it to disk (used | //! Adds a watch-only address to the store, without saving it to disk (used | ||||
//! by LoadWallet) | //! by LoadWallet) | ||||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | DBErrors ZapSelectTx(std::vector<TxId> &txIdsIn, | ||||
std::vector<TxId> &txIdsOut) | std::vector<TxId> &txIdsOut) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
bool SetAddressBook(const CTxDestination &address, | 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); | |||||
void GetScriptForMining(std::shared_ptr<CReserveScript> &script); | void GetScriptForMining(std::shared_ptr<CReserveScript> &script); | ||||
unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | unsigned int GetKeyPoolSize() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | ||||
// set{Ex,In}ternalKeyPool | // set{Ex,In}ternalKeyPool | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
return setInternalKeyPool.size() + setExternalKeyPool.size(); | return setInternalKeyPool.size() + setExternalKeyPool.size(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines |