Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,331 Lines • ▼ Show 20 Lines | for (const auto &coin : coins) { | ||||
} | } | ||||
nIn++; | nIn++; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
OutputType ParseOutputType(const std::string &str, | |||||
OutputType default_type = OutputType::DEFAULT); | |||||
const std::string &FormatOutputType(OutputType type); | |||||
/** | |||||
* Get a destination of the requested type (if possible) to the specified key. | |||||
* The caller must make sure LearnRelatedScripts has been called beforehand. | |||||
*/ | |||||
CTxDestination GetDestinationForKey(const CPubKey &key, OutputType); | |||||
/** | |||||
* Get all destinations (potentially) supported by the wallet for the given key. | |||||
*/ | |||||
std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey &key); | |||||
/** RAII object to check and reserve a wallet rescan */ | /** RAII object to check and reserve a wallet rescan */ | ||||
class WalletRescanReserver { | class WalletRescanReserver { | ||||
private: | private: | ||||
CWalletRef m_wallet; | CWalletRef m_wallet; | ||||
bool m_could_reserve; | bool m_could_reserve; | ||||
public: | public: | ||||
explicit WalletRescanReserver(CWalletRef w) | explicit WalletRescanReserver(CWalletRef w) | ||||
Show All 17 Lines | public: | ||||
~WalletRescanReserver() { | ~WalletRescanReserver() { | ||||
std::lock_guard<std::mutex> lock(m_wallet->mutexScanning); | std::lock_guard<std::mutex> lock(m_wallet->mutexScanning); | ||||
if (m_could_reserve) { | if (m_could_reserve) { | ||||
m_wallet->fScanningWallet = false; | m_wallet->fScanningWallet = false; | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
OutputType ParseOutputType(const std::string &str, | |||||
OutputType default_type = OutputType::DEFAULT); | |||||
const std::string &FormatOutputType(OutputType type); | |||||
/** | |||||
* Get a destination of the requested type (if possible) to the specified key. | |||||
* The caller must make sure LearnRelatedScripts has been called beforehand. | |||||
*/ | |||||
CTxDestination GetDestinationForKey(const CPubKey &key, OutputType); | |||||
/** | |||||
* Get all destinations (potentially) supported by the wallet for the given key. | |||||
*/ | |||||
std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey &key); | |||||
#endif // BITCOIN_WALLET_WALLET_H | #endif // BITCOIN_WALLET_WALLET_H |