Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,053 Lines • ▼ Show 20 Lines | public: | ||||
using UpdateWalletTxFn = std::function<bool(CWalletTx &wtx, bool new_tx)>; | using UpdateWalletTxFn = std::function<bool(CWalletTx &wtx, bool new_tx)>; | ||||
CWalletTx *AddToWallet(CTransactionRef tx, | CWalletTx *AddToWallet(CTransactionRef tx, | ||||
const CWalletTx::Confirmation &confirm, | const CWalletTx::Confirmation &confirm, | ||||
const UpdateWalletTxFn &update_wtx = nullptr, | const UpdateWalletTxFn &update_wtx = nullptr, | ||||
bool fFlushOnClose = true); | bool fFlushOnClose = true); | ||||
bool LoadToWallet(const TxId &txid, const UpdateWalletTxFn &fill_wtx) | bool LoadToWallet(const TxId &txid, const UpdateWalletTxFn &fill_wtx) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
void transactionAddedToMempool(const CTransactionRef &tx) override; | void transactionAddedToMempool(const CTransactionRef &tx, | ||||
uint64_t mempool_sequence) 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); | ||||
struct ScanResult { | struct ScanResult { | ||||
enum { SUCCESS, FAILURE, USER_ABORT } status = SUCCESS; | enum { SUCCESS, FAILURE, USER_ABORT } status = SUCCESS; | ||||
Show All 11 Lines | struct ScanResult { | ||||
BlockHash last_failed_block; | BlockHash last_failed_block; | ||||
}; | }; | ||||
ScanResult ScanForWalletTransactions(const BlockHash &start_block, | ScanResult ScanForWalletTransactions(const BlockHash &start_block, | ||||
int start_height, | int start_height, | ||||
std::optional<int> max_height, | std::optional<int> max_height, | ||||
const WalletRescanReserver &reserver, | const WalletRescanReserver &reserver, | ||||
bool fUpdate); | bool fUpdate); | ||||
void transactionRemovedFromMempool(const CTransactionRef &tx, | void transactionRemovedFromMempool(const CTransactionRef &tx, | ||||
MemPoolRemovalReason reason) override; | MemPoolRemovalReason reason, | ||||
uint64_t mempool_sequence) override; | |||||
void ReacceptWalletTransactions() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | void ReacceptWalletTransactions() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); | ||||
void ResendWalletTransactions(); | void ResendWalletTransactions(); | ||||
struct Balance { | struct Balance { | ||||
//! Trusted, at depth=GetBalance.min_depth or more | //! Trusted, at depth=GetBalance.min_depth or more | ||||
Amount m_mine_trusted{Amount::zero()}; | Amount m_mine_trusted{Amount::zero()}; | ||||
//! Untrusted, but in mempool (pending) | //! Untrusted, but in mempool (pending) | ||||
Amount m_mine_untrusted_pending{Amount::zero()}; | Amount m_mine_untrusted_pending{Amount::zero()}; | ||||
//! Immature coinbases in the main chain | //! Immature coinbases in the main chain | ||||
▲ Show 20 Lines • Show All 539 Lines • Show Last 20 Lines |