diff options
| author | Jonas Schnelli <[email protected]> | 2017-01-16 11:10:12 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2017-03-24 10:28:39 +0100 |
| commit | d0a627a53aa8cc5cd190f54c95b888dff88a4d37 (patch) | |
| tree | 7cf29b3bec17ea60859875eb6b76c9a5fb8612ce | |
| parent | Make sure we hand out keypool keys if HD_SPLIT is not enabled (diff) | |
| download | discoin-d0a627a53aa8cc5cd190f54c95b888dff88a4d37.tar.xz discoin-d0a627a53aa8cc5cd190f54c95b888dff88a4d37.zip | |
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
| -rw-r--r-- | src/wallet/wallet.cpp | 1 | ||||
| -rw-r--r-- | src/wallet/wallet.h | 15 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 9c5172366..488e6690c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3933,6 +3933,7 @@ bool CWallet::BackupWallet(const std::string& strDest) CKeyPool::CKeyPool() { nTime = GetTime(); + fInternal = false; } CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn, bool internalIn) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index bf6c5a2a8..d93830f08 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -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); } } }; |