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
181
181
}
182
182
};
183
183
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
+
184
212
/* * Address book data */
185
213
class CAddressBookData
186
214
{
@@ -1218,34 +1246,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
1218
1246
*/
1219
1247
void MaybeResendWalletTxs ();
1220
1248
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
-
1249
1249
/* * RAII object to check and reserve a wallet rescan */
1250
1250
class WalletRescanReserver
1251
1251
{
You can’t perform that action at this time.
0 commit comments