diff options
author | John Newbery <john@johnnewbery.com> | 2019-04-09 13:13:03 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-04-14 09:32:40 -0400 |
commit | ef2d515af3c74f61acca5c0c8936a30e7befc507 (patch) | |
tree | 7f0587179554e1005147f2ebcfe9f7806b6ee485 /src/wallet | |
parent | adc55dbac5b521d6c9df58d1d69075e6abf0116f (diff) |
[wallet] move-only: move CReserveKey to be next to CKeyPool
reviewer tip: use git diff --color-moved=dimmed-zebra
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 53de1ea065..370085d0bb 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -181,6 +181,34 @@ public: } }; +/** A key allocated from the key pool. */ +class CReserveKey +{ +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(); +}; + /** Address book data */ class CAddressBookData { @@ -1218,34 +1246,6 @@ public: */ void MaybeResendWalletTxs(); -/** A key allocated from the key pool. */ -class CReserveKey -{ -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(); -}; - /** RAII object to check and reserve a wallet rescan */ class WalletRescanReserver { |