[wallet] move-only: move CReserveKey to be next to CKeyPool
reviewer tip: use git diff --color-moved=dimmed-zebra
This commit is contained in:
parent
adc55dbac5
commit
ef2d515af3
1 changed files with 28 additions and 28 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue