Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,112 Lines • ▼ Show 20 Lines | public: | ||||
CFeeRate m_fallback_fee{DEFAULT_FALLBACK_FEE}; | CFeeRate m_fallback_fee{DEFAULT_FALLBACK_FEE}; | ||||
OutputType m_default_address_type{DEFAULT_ADDRESS_TYPE}; | OutputType m_default_address_type{DEFAULT_ADDRESS_TYPE}; | ||||
// Default to OutputType::NONE if not set by -changetype | // Default to OutputType::NONE if not set by -changetype | ||||
OutputType m_default_change_type{OutputType::NONE}; | OutputType m_default_change_type{OutputType::NONE}; | ||||
bool NewKeyPool(); | bool NewKeyPool(); | ||||
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); | ||||
void ReserveKeyFromKeyPool(int64_t &nIndex, CKeyPool &keypool, | |||||
/** | |||||
* Reserves a key from the keypool and sets nIndex to its index | |||||
* | |||||
* @param[out] nIndex the index of the key in keypool | |||||
* @param[out] keypool the keypool the key was drawn from, which could be | |||||
* the the pre-split pool if present, or the internal or external pool | |||||
* @param fRequestedInternal true if the caller would like the key drawn | |||||
* from the internal keypool, false if external is preferred | |||||
* | |||||
* @return true if succeeded, false if failed due to empty keypool | |||||
* @throws std::runtime_error if keypool read failed, key was invalid, | |||||
* was not found in the wallet, or was misclassified in the internal | |||||
* or external keypool | |||||
*/ | |||||
bool ReserveKeyFromKeyPool(int64_t &nIndex, CKeyPool &keypool, | |||||
bool fRequestedInternal); | bool fRequestedInternal); | ||||
void KeepKey(int64_t nIndex); | void KeepKey(int64_t nIndex); | ||||
void ReturnKey(int64_t nIndex, bool fInternal, const CPubKey &pubkey); | void ReturnKey(int64_t nIndex, bool fInternal, const CPubKey &pubkey); | ||||
bool GetKeyFromPool(CPubKey &key, bool internal = false); | bool GetKeyFromPool(CPubKey &key, bool internal = false); | ||||
int64_t GetOldestKeyPoolTime(); | int64_t GetOldestKeyPoolTime(); | ||||
/** | /** | ||||
* Marks all keys in the keypool up to and including reserve_key as used. | * Marks all keys in the keypool up to and including reserve_key as used. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 303 Lines • Show Last 20 Lines |