Browse Source

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

0.15
Jonas Schnelli 8 years ago
parent
commit
d0a627a53a
No known key found for this signature in database
GPG Key ID: 1EB776BB03C7922D
  1. 1
      src/wallet/wallet.cpp
  2. 13
      src/wallet/wallet.h

1
src/wallet/wallet.cpp

@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest) @@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
CKeyPool::CKeyPool()
{
nTime = GetTime();
fInternal = false;
}
CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn)

13
src/wallet/wallet.h

@ -114,14 +114,19 @@ public: @@ -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 */

Loading…
Cancel
Save