mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
This commit is contained in:
parent
9af8f00a75
commit
d0a627a53a
@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
|
||||
CKeyPool::CKeyPool()
|
||||
{
|
||||
nTime = GetTime();
|
||||
fInternal = false;
|
||||
}
|
||||
|
||||
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)
|
||||
|
@ -114,12 +114,17 @@ public:
|
||||
READWRITE(nVersion);
|
||||
READWRITE(nTime);
|
||||
READWRITE(vchPubKey);
|
||||
if (nVersion >= FEATURE_HD_SPLIT)
|
||||
READWRITE(fInternal);
|
||||
else
|
||||
{
|
||||
if (ser_action.ForRead())
|
||||
if (ser_action.ForRead()) {
|
||||
try {
|
||||
READWRITE(fInternal);
|
||||
}
|
||||
catch (...) {
|
||||
/* flag as external address if we can't read the internal boolean */
|
||||
fInternal = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
READWRITE(fInternal);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user