Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 900 Lines • ▼ Show 20 Lines | bool SelectCoinsMinConf(const Amount nTargetValue, | ||||
bool &bnb_used) const; | bool &bnb_used) const; | ||||
bool IsSpent(const COutPoint &outpoint) const | bool IsSpent(const COutPoint &outpoint) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
// Whether this or any UTXO with the same CTxDestination has been spent. | // Whether this or any UTXO with the same CTxDestination has been spent. | ||||
bool IsUsedDestination(const CTxDestination &dst) const; | bool IsUsedDestination(const CTxDestination &dst) const; | ||||
bool IsUsedDestination(const TxId &txid, unsigned int n) const; | bool IsUsedDestination(const TxId &txid, unsigned int n) const; | ||||
void SetUsedDestinationState(const TxId &hash, unsigned int n, bool used); | void SetUsedDestinationState(WalletBatch &batch, const TxId &txid, | ||||
unsigned int n, bool used) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
std::vector<OutputGroup> GroupOutputs(const std::vector<COutput> &outputs, | std::vector<OutputGroup> GroupOutputs(const std::vector<COutput> &outputs, | ||||
bool single_coin) const; | bool single_coin) const; | ||||
bool IsLockedCoin(const COutPoint &outpoint) const | bool IsLockedCoin(const COutPoint &outpoint) const | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
void LockCoin(const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | void LockCoin(const COutPoint &output) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
void UnlockCoin(const COutPoint &output) | void UnlockCoin(const COutPoint &output) | ||||
Show All 22 Lines | public: | ||||
bool LoadMinVersion(int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | bool LoadMinVersion(int nVersion) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet) { | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
nWalletVersion = nVersion; | nWalletVersion = nVersion; | ||||
nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); | nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); | ||||
return true; | return true; | ||||
} | } | ||||
//! 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(WalletBatch &batch, const CTxDestination &dest, | ||||
const std::string &value) | const std::string &key, const std::string &value) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | 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(WalletBatch &batch, const CTxDestination &dest, | ||||
const std::string &key) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | 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); | 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, | ||||
▲ Show 20 Lines • Show All 483 Lines • Show Last 20 Lines |