Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 1,299 Lines • ▼ Show 20 Lines | public: | ||||
CTxDestination AddAndGetDestinationForScript(const CScript &script, | CTxDestination AddAndGetDestinationForScript(const CScript &script, | ||||
OutputType); | OutputType); | ||||
}; | }; | ||||
/** 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: | ||||
CWallet *pwallet; | CWallet *pwallet; | ||||
int64_t nIndex; | int64_t nIndex{-1}; | ||||
CPubKey vchPubKey; | CPubKey vchPubKey; | ||||
bool fInternal; | bool fInternal{false}; | ||||
public: | public: | ||||
explicit CReserveKey(CWallet *pwalletIn) { | explicit CReserveKey(CWallet *pwalletIn) { pwallet = pwalletIn; } | ||||
nIndex = -1; | |||||
pwallet = pwalletIn; | |||||
fInternal = false; | |||||
} | |||||
CReserveKey() = default; | |||||
CReserveKey(const CReserveKey &) = delete; | CReserveKey(const CReserveKey &) = delete; | ||||
CReserveKey &operator=(const CReserveKey &) = delete; | CReserveKey &operator=(const CReserveKey &) = delete; | ||||
~CReserveKey() { ReturnKey(); } | ~CReserveKey() { ReturnKey(); } | ||||
void ReturnKey(); | void ReturnKey(); | ||||
bool GetReservedKey(CPubKey &pubkey, bool internal = false); | bool GetReservedKey(CPubKey &pubkey, bool internal = false); | ||||
void KeepKey(); | void KeepKey(); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |