Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
} | } | ||||
} else { | } else { | ||||
READWRITE(fInternal); | READWRITE(fInternal); | ||||
READWRITE(m_pre_split); | READWRITE(m_pre_split); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
/** A key allocated from the key pool. */ | |||||
class CReserveKey final : public CReserveScript { | |||||
protected: | |||||
CWallet *pwallet; | |||||
int64_t nIndex{-1}; | |||||
CPubKey vchPubKey; | |||||
bool fInternal{false}; | |||||
public: | |||||
explicit CReserveKey(CWallet *pwalletIn) { pwallet = pwalletIn; } | |||||
CReserveKey(const CReserveKey &) = delete; | |||||
CReserveKey &operator=(const CReserveKey &) = delete; | |||||
~CReserveKey() { ReturnKey(); } | |||||
void ReturnKey(); | |||||
bool GetReservedKey(CPubKey &pubkey, bool internal = false); | |||||
void KeepKey(); | |||||
void KeepScript() override { KeepKey(); } | |||||
}; | |||||
/** Address book data */ | /** Address book data */ | ||||
class CAddressBookData { | class CAddressBookData { | ||||
public: | public: | ||||
std::string name; | std::string name; | ||||
std::string purpose; | std::string purpose; | ||||
CAddressBookData() : purpose("unknown") {} | CAddressBookData() : purpose("unknown") {} | ||||
▲ Show 20 Lines • Show All 1,234 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Called periodically by the schedule thread. Prompts individual wallets to | * Called periodically by the schedule thread. Prompts individual wallets to | ||||
* resend their transactions. Actual rebroadcast schedule is managed by the | * resend their transactions. Actual rebroadcast schedule is managed by the | ||||
* wallets themselves. | * wallets themselves. | ||||
*/ | */ | ||||
void MaybeResendWalletTxs(); | void MaybeResendWalletTxs(); | ||||
/** A key allocated from the key pool. */ | |||||
class CReserveKey final : public CReserveScript { | |||||
protected: | |||||
CWallet *pwallet; | |||||
int64_t nIndex{-1}; | |||||
CPubKey vchPubKey; | |||||
bool fInternal{false}; | |||||
public: | |||||
explicit CReserveKey(CWallet *pwalletIn) { pwallet = pwalletIn; } | |||||
CReserveKey(const CReserveKey &) = delete; | |||||
CReserveKey &operator=(const CReserveKey &) = delete; | |||||
~CReserveKey() { ReturnKey(); } | |||||
void ReturnKey(); | |||||
bool GetReservedKey(CPubKey &pubkey, bool internal = false); | |||||
void KeepKey(); | |||||
void KeepScript() override { KeepKey(); } | |||||
}; | |||||
/** RAII object to check and reserve a wallet rescan */ | /** RAII object to check and reserve a wallet rescan */ | ||||
class WalletRescanReserver { | class WalletRescanReserver { | ||||
private: | private: | ||||
CWallet *m_wallet; | CWallet *m_wallet; | ||||
bool m_could_reserve; | bool m_could_reserve; | ||||
public: | public: | ||||
explicit WalletRescanReserver(CWallet *w) | explicit WalletRescanReserver(CWallet *w) | ||||
Show All 39 Lines |