|
|
@@ -701,6 +701,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface |
|
|
|
|
|
std::set<int64_t> setInternalKeyPool;
|
|
|
std::set<int64_t> setExternalKeyPool;
|
|
|
+ int64_t m_max_keypool_index;
|
|
|
|
|
|
int64_t nTimeFirstKey;
|
|
|
|
|
|
@@ -743,13 +744,14 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface |
|
|
}
|
|
|
}
|
|
|
|
|
|
- void LoadKeyPool(int nIndex, const CKeyPool &keypool)
|
|
|
+ void LoadKeyPool(int64_t nIndex, const CKeyPool &keypool)
|
|
|
{
|
|
|
if (keypool.fInternal) {
|
|
|
setInternalKeyPool.insert(nIndex);
|
|
|
} else {
|
|
|
setExternalKeyPool.insert(nIndex);
|
|
|
}
|
|
|
+ m_max_keypool_index = std::max(m_max_keypool_index, nIndex);
|
|
|
|
|
|
// If no metadata exists yet, create a default with the pool key's
|
|
|
// creation time. Note that this may be overwritten by actually
|
|
|
@@ -795,6 +797,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface |
|
|
nAccountingEntryNumber = 0;
|
|
|
nNextResend = 0;
|
|
|
nLastResend = 0;
|
|
|
+ m_max_keypool_index = 0;
|
|
|
nTimeFirstKey = 0;
|
|
|
fBroadcastTransactions = false;
|
|
|
nRelockTime = 0;
|
|
|
|