Fix issue where CDataStream->nVersion was taken a CKeyPool record version

This commit is contained in:
Jonas Schnelli committed 2017-03-24 10:28:39 +01:00
1 parent 9af8f00a75
commit d0a627a53a
2 files changed
+10 -4

No files matched your search

+1
View File
@@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
CKeyPool::CKeyPool()
{
nTime = GetTime();
fInternal = false;
}
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)
+9 -4
View File
@@ -114,14 +114,19 @@ public:
READWRITE(nVersion);
READWRITE(nTime);
READWRITE(vchPubKey);
if (nVersion >= FEATURE_HD_SPLIT)
if (ser_action.ForRead()) {
try {
READWRITE(fInternal);
else
{
if (ser_action.ForRead())
}
catch (...) {
/* flag as external address if we can't read the internal boolean */
fInternal = false;
}
}
else {
READWRITE(fInternal);
}
}
};
/** Address book data */