Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,040 Lines • ▼ Show 20 Lines | ~CWallet() { | ||||
delete encrypted_batch; | delete encrypted_batch; | ||||
encrypted_batch = nullptr; | encrypted_batch = nullptr; | ||||
} | } | ||||
bool IsCrypted() const { return fUseCrypto; } | bool IsCrypted() const { return fUseCrypto; } | ||||
bool IsLocked() const; | bool IsLocked() const; | ||||
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; | |||||
} | |||||
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; | ||||
▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | public: | ||||
* @return next transaction order id | * @return next transaction order id | ||||
*/ | */ | ||||
int64_t IncOrderPosNext(WalletBatch *batch = nullptr) | int64_t IncOrderPosNext(WalletBatch *batch = nullptr) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
DBErrors ReorderTransactions(); | DBErrors ReorderTransactions(); | ||||
void MarkDirty(); | void MarkDirty(); | ||||
bool AddToWallet(const CWalletTx &wtxIn, bool fFlushOnClose = true); | bool AddToWallet(const CWalletTx &wtxIn, bool fFlushOnClose = true); | ||||
void LoadToWallet(const CWalletTx &wtxIn) | void LoadToWallet(CWalletTx &wtxIn) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | |||||
void TransactionAddedToMempool(const CTransactionRef &tx) override; | void TransactionAddedToMempool(const CTransactionRef &tx) override; | ||||
void | void | ||||
BlockConnected(const CBlock &block, | BlockConnected(const CBlock &block, | ||||
const std::vector<CTransactionRef> &vtxConflicted) override; | const std::vector<CTransactionRef> &vtxConflicted) override; | ||||
void BlockDisconnected(const CBlock &block) override; | void BlockDisconnected(const CBlock &block) override; | ||||
void UpdatedBlockTip() override; | void UpdatedBlockTip() override; | ||||
int64_t RescanFromTime(int64_t startTime, | int64_t RescanFromTime(int64_t startTime, | ||||
const WalletRescanReserver &reserver, bool update); | const WalletRescanReserver &reserver, bool update); | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |