Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,039 Lines • ▼ Show 20 Lines | public: | ||||
* 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) | ||||
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); | |||||
//! Callback for updating transaction metadata in mapWallet. | |||||
//! | |||||
//! @param wtx - reference to mapWallet transaction to update | |||||
//! @param new_tx - true if wtx is newly inserted, false if it previously | |||||
//! existed | |||||
//! | |||||
//! @return true if wtx is changed and needs to be saved to disk, otherwise | |||||
//! false | |||||
using UpdateWalletTxFn = std::function<bool(CWalletTx &wtx, bool new_tx)>; | |||||
CWalletTx *AddToWallet(CTransactionRef tx, | |||||
const CWalletTx::Confirmation &confirm, | |||||
const UpdateWalletTxFn &update_wtx = nullptr, | |||||
bool fFlushOnClose = true); | |||||
void LoadToWallet(CWalletTx &wtxIn) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | void LoadToWallet(CWalletTx &wtxIn) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
void transactionAddedToMempool(const CTransactionRef &tx) override; | void transactionAddedToMempool(const CTransactionRef &tx) override; | ||||
void blockConnected(const CBlock &block, int height) override; | void blockConnected(const CBlock &block, int height) override; | ||||
void blockDisconnected(const CBlock &block, int height) override; | void blockDisconnected(const CBlock &block, int height) 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 541 Lines • Show Last 20 Lines |