Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,400 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Overwrite all flags by the given uint64_t. | * Overwrite all flags by the given uint64_t. | ||||
* Returns false if unknown, non-tolerable flags are present. | * Returns false if unknown, non-tolerable flags are present. | ||||
*/ | */ | ||||
bool SetWalletFlags(uint64_t overwriteFlags, bool memOnly); | bool SetWalletFlags(uint64_t overwriteFlags, bool memOnly); | ||||
/** | /** | ||||
* Returns a bracketed wallet name for displaying in logs, will return | |||||
* [default wallet] if the wallet has no name. | |||||
*/ | |||||
const std::string GetDisplayName() const { | |||||
std::string wallet_name = | |||||
GetName().length() == 0 ? "default wallet" : GetName(); | |||||
return strprintf("[%s]", wallet_name); | |||||
}; | |||||
/** | |||||
* Prepends the wallet name in logging output to ease debugging in | |||||
* multi-wallet use cases. | |||||
*/ | |||||
template <typename... Params> | |||||
void WalletLogPrintf(std::string fmt, Params... parameters) const { | |||||
LogPrintf(("%s " + fmt).c_str(), GetDisplayName(), parameters...); | |||||
}; | |||||
template <typename... Params> | |||||
void WalletLogPrintfToBeContinued(std::string fmt, | |||||
Params... parameters) const { | |||||
LogPrintfToBeContinued(("%s " + fmt).c_str(), GetDisplayName(), | |||||
parameters...); | |||||
}; | |||||
/** | |||||
* Implement lookup of key origin information through wallet key metadata. | * Implement lookup of key origin information through wallet key metadata. | ||||
*/ | */ | ||||
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override; | bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override; | ||||
}; | }; | ||||
/** A key allocated from the key pool. */ | /** A key allocated from the key pool. */ | ||||
class CReserveKey final : public CReserveScript { | class CReserveKey final : public CReserveScript { | ||||
protected: | protected: | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |