Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 661 Lines • ▼ Show 20 Lines | |||||
private: | private: | ||||
static std::atomic<bool> fFlushScheduled; | static std::atomic<bool> fFlushScheduled; | ||||
std::atomic<bool> fAbortRescan; | std::atomic<bool> fAbortRescan; | ||||
// controlled by WalletRescanReserver | // controlled by WalletRescanReserver | ||||
std::atomic<bool> fScanningWallet; | std::atomic<bool> fScanningWallet; | ||||
std::mutex mutexScanning; | std::mutex mutexScanning; | ||||
friend class WalletRescanReserver; | friend class WalletRescanReserver; | ||||
/** | |||||
* Select a set of coins such that nValueRet >= nTargetValue and at least | |||||
* all coins from coinControl are selected; Never select unconfirmed coins | |||||
* if they are not ours. | |||||
*/ | |||||
bool SelectCoins(const std::vector<COutput> &vAvailableCoins, | |||||
const Amount nTargetValue, | |||||
std::set<CInputCoin> &setCoinsRet, Amount &nValueRet, | |||||
const CCoinControl &coin_control, | |||||
const CoinSelectionParams &coin_selection_params, | |||||
bool &bnb_used) const; | |||||
CWalletDB *pwalletdbEncryption; | CWalletDB *pwalletdbEncryption; | ||||
//! the current wallet version: clients below this version are not able to | //! the current wallet version: clients below this version are not able to | ||||
//! load the wallet | //! load the wallet | ||||
int nWalletVersion; | int nWalletVersion; | ||||
//! the maximum wallet format version: memory-only variable that specifies | //! the maximum wallet format version: memory-only variable that specifies | ||||
//! to what version this wallet may be upgraded | //! to what version this wallet may be upgraded | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Get database handle used by this wallet. Ideally this function would not | * Get database handle used by this wallet. Ideally this function would not | ||||
* be necessary. | * be necessary. | ||||
*/ | */ | ||||
CWalletDBWrapper &GetDBHandle() { return *dbw; } | CWalletDBWrapper &GetDBHandle() { return *dbw; } | ||||
/** | /** | ||||
* Select a set of coins such that nValueRet >= nTargetValue and at least | |||||
* all coins from coinControl are selected; Never select unconfirmed coins | |||||
* if they are not ours. | |||||
*/ | |||||
bool SelectCoins(const std::vector<COutput> &vAvailableCoins, | |||||
const Amount nTargetValue, | |||||
std::set<CInputCoin> &setCoinsRet, Amount &nValueRet, | |||||
const CCoinControl &coin_control, | |||||
CoinSelectionParams &coin_selection_params, | |||||
bool &bnb_used) const; | |||||
/** | |||||
* Get a name for this wallet for logging/debugging purposes. | * Get a name for this wallet for logging/debugging purposes. | ||||
*/ | */ | ||||
std::string GetName() const { return m_name; } | std::string GetName() const { return m_name; } | ||||
void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool); | void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool); | ||||
// Map from Key ID to key metadata. | // Map from Key ID to key metadata. | ||||
std::map<CKeyID, CKeyMetadata> mapKeyMetadata; | std::map<CKeyID, CKeyMetadata> mapKeyMetadata; | ||||
▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines |