aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-01-16 11:10:12 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2017-03-24 10:28:39 +0100
commitd0a627a53aa8cc5cd190f54c95b888dff88a4d37 (patch)
tree7cf29b3bec17ea60859875eb6b76c9a5fb8612ce /src/wallet/wallet.h
parent9af8f00a7530934d4c9c64eb6c2676ac80b24ace (diff)
Fix issue where CDataStream->nVersion was taken a CKeyPool record version
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index bf6c5a2a87..d93830f085 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);
}
}
};