Fix issue where CDataStream->nVersion was taken a CKeyPool record version
This commit is contained in:
parent
9af8f00a75
commit
d0a627a53a
2 changed files with 11 additions and 5 deletions
|
@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
|
||||||
CKeyPool::CKeyPool()
|
CKeyPool::CKeyPool()
|
||||||
{
|
{
|
||||||
nTime = GetTime();
|
nTime = GetTime();
|
||||||
|
fInternal = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)
|
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)
|
||||||
|
|
|
@ -114,14 +114,19 @@ public:
|
||||||
READWRITE(nVersion);
|
READWRITE(nVersion);
|
||||||
READWRITE(nTime);
|
READWRITE(nTime);
|
||||||
READWRITE(vchPubKey);
|
READWRITE(vchPubKey);
|
||||||
if (nVersion >= FEATURE_HD_SPLIT)
|
if (ser_action.ForRead()) {
|
||||||
|
try {
|
||||||
READWRITE(fInternal);
|
READWRITE(fInternal);
|
||||||
else
|
}
|
||||||
{
|
catch (...) {
|
||||||
if (ser_action.ForRead())
|
/* flag as external address if we can't read the internal boolean */
|
||||||
fInternal = false;
|
fInternal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
READWRITE(fInternal);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Address book data */
|
/** Address book data */
|
||||||
|
|
Loading…
Reference in a new issue