File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -3240,6 +3240,23 @@ size_t CWallet::KeypoolCountExternalKeys()
3240
3240
return setExternalKeyPool.size ();
3241
3241
}
3242
3242
3243
+ void CWallet::LoadKeyPool (int64_t nIndex, const CKeyPool &keypool)
3244
+ {
3245
+ if (keypool.fInternal ) {
3246
+ setInternalKeyPool.insert (nIndex);
3247
+ } else {
3248
+ setExternalKeyPool.insert (nIndex);
3249
+ }
3250
+ m_max_keypool_index = std::max (m_max_keypool_index, nIndex);
3251
+
3252
+ // If no metadata exists yet, create a default with the pool key's
3253
+ // creation time. Note that this may be overwritten by actually
3254
+ // stored metadata for that key later, which is fine.
3255
+ CKeyID keyid = keypool.vchPubKey .GetID ();
3256
+ if (mapKeyMetadata.count (keyid) == 0 )
3257
+ mapKeyMetadata[keyid] = CKeyMetadata (keypool.nTime );
3258
+ }
3259
+
3243
3260
bool CWallet::TopUpKeyPool (unsigned int kpSize)
3244
3261
{
3245
3262
{
Original file line number Diff line number Diff line change @@ -746,22 +746,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
746
746
}
747
747
}
748
748
749
- void LoadKeyPool (int64_t nIndex, const CKeyPool &keypool)
750
- {
751
- if (keypool.fInternal ) {
752
- setInternalKeyPool.insert (nIndex);
753
- } else {
754
- setExternalKeyPool.insert (nIndex);
755
- }
756
- m_max_keypool_index = std::max (m_max_keypool_index, nIndex);
757
-
758
- // If no metadata exists yet, create a default with the pool key's
759
- // creation time. Note that this may be overwritten by actually
760
- // stored metadata for that key later, which is fine.
761
- CKeyID keyid = keypool.vchPubKey .GetID ();
762
- if (mapKeyMetadata.count (keyid) == 0 )
763
- mapKeyMetadata[keyid] = CKeyMetadata (keypool.nTime );
764
- }
749
+ void LoadKeyPool (int64_t nIndex, const CKeyPool &keypool);
765
750
766
751
// Map from Key ID (for regular keys) or Script ID (for watch-only keys) to
767
752
// key metadata.
You can’t perform that action at this time.
0 commit comments