File tree Expand file tree Collapse file tree 1 file changed +28
-28
lines changed
Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,34 @@ class CKeyPool
181181 }
182182};
183183
184+ /* * A key allocated from the key pool. */
185+ class CReserveKey
186+ {
187+ protected:
188+ CWallet* pwallet;
189+ int64_t nIndex{-1 };
190+ CPubKey vchPubKey;
191+ bool fInternal {false };
192+
193+ public:
194+ explicit CReserveKey (CWallet* pwalletIn)
195+ {
196+ pwallet = pwalletIn;
197+ }
198+
199+ CReserveKey (const CReserveKey&) = delete ;
200+ CReserveKey& operator =(const CReserveKey&) = delete ;
201+
202+ ~CReserveKey ()
203+ {
204+ ReturnKey ();
205+ }
206+
207+ void ReturnKey ();
208+ bool GetReservedKey (CPubKey &pubkey, bool internal = false );
209+ void KeepKey ();
210+ };
211+
184212/* * Address book data */
185213class CAddressBookData
186214{
@@ -1218,34 +1246,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
12181246 */
12191247void MaybeResendWalletTxs ();
12201248
1221- /* * A key allocated from the key pool. */
1222- class CReserveKey
1223- {
1224- protected:
1225- CWallet* pwallet;
1226- int64_t nIndex{-1 };
1227- CPubKey vchPubKey;
1228- bool fInternal {false };
1229-
1230- public:
1231- explicit CReserveKey (CWallet* pwalletIn)
1232- {
1233- pwallet = pwalletIn;
1234- }
1235-
1236- CReserveKey (const CReserveKey&) = delete ;
1237- CReserveKey& operator =(const CReserveKey&) = delete ;
1238-
1239- ~CReserveKey ()
1240- {
1241- ReturnKey ();
1242- }
1243-
1244- void ReturnKey ();
1245- bool GetReservedKey (CPubKey &pubkey, bool internal = false );
1246- void KeepKey ();
1247- };
1248-
12491249/* * RAII object to check and reserve a wallet rescan */
12501250class WalletRescanReserver
12511251{
You can’t perform that action at this time.
0 commit comments