Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 854 Lines • ▼ Show 20 Lines | ~CWallet() { | ||||
// Should not have slots connected at this point. | // Should not have slots connected at this point. | ||||
assert(NotifyUnload.empty()); | assert(NotifyUnload.empty()); | ||||
} | } | ||||
bool IsCrypted() const; | bool IsCrypted() const; | ||||
bool IsLocked() const override; | bool IsLocked() const override; | ||||
bool Lock(); | bool Lock(); | ||||
/** Interface to assert chain access and if successful lock it */ | |||||
std::unique_ptr<interfaces::Chain::Lock> LockChain() { | |||||
return m_chain ? m_chain->lock() : nullptr; | |||||
} | |||||
/** Interface to assert chain access */ | /** Interface to assert chain access */ | ||||
bool HaveChain() const { return m_chain ? true : false; } | bool HaveChain() const { return m_chain ? true : false; } | ||||
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; | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | public: | ||||
int64_t nRelockTime = 0; | int64_t nRelockTime = 0; | ||||
bool Unlock(const SecureString &strWalletPassphrase, | bool Unlock(const SecureString &strWalletPassphrase, | ||||
bool accept_no_keys = false); | bool accept_no_keys = false); | ||||
bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, | bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, | ||||
const SecureString &strNewWalletPassphrase); | const SecureString &strNewWalletPassphrase); | ||||
bool EncryptWallet(const SecureString &strWalletPassphrase); | bool EncryptWallet(const SecureString &strWalletPassphrase); | ||||
void GetKeyBirthTimes(interfaces::Chain::Lock &locked_chain, | void GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const | ||||
std::map<CKeyID, int64_t> &mapKeyBirth) const | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
unsigned int ComputeTimeSmart(const CWalletTx &wtx) const; | unsigned int ComputeTimeSmart(const CWalletTx &wtx) const; | ||||
/** | /** | ||||
* Increment the next transaction order id | * Increment the next transaction order id | ||||
* @return next transaction order id | * @return next transaction order id | ||||
*/ | */ | ||||
int64_t IncOrderPosNext(WalletBatch *batch = nullptr) | int64_t IncOrderPosNext(WalletBatch *batch = nullptr) | ||||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | public: | ||||
size_t KeypoolCountExternalKeys() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | size_t KeypoolCountExternalKeys() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
bool TopUpKeyPool(unsigned int kpSize = 0); | bool TopUpKeyPool(unsigned int kpSize = 0); | ||||
int64_t GetOldestKeyPoolTime(); | int64_t GetOldestKeyPoolTime(); | ||||
std::set<std::set<CTxDestination>> GetAddressGroupings() | std::set<std::set<CTxDestination>> GetAddressGroupings() | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
std::map<CTxDestination, Amount> | std::map<CTxDestination, Amount> GetAddressBalances(); | ||||
GetAddressBalances(interfaces::Chain::Lock &locked_chain); | |||||
std::set<CTxDestination> GetLabelAddresses(const std::string &label) const; | std::set<CTxDestination> GetLabelAddresses(const std::string &label) const; | ||||
/** | /** | ||||
* Marks all outputs in each one of the destinations dirty, so their cache | * Marks all outputs in each one of the destinations dirty, so their cache | ||||
* is reset and does not return outdated information. | * is reset and does not return outdated information. | ||||
*/ | */ | ||||
void MarkDestinationsDirty(const std::set<CTxDestination> &destinations) | void MarkDestinationsDirty(const std::set<CTxDestination> &destinations) | ||||
▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines |