aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2019-07-30 20:31:12 +1200
committerMeshCollider <dobsonsa68@gmail.com>2019-07-30 20:31:32 +1200
commitff57fb45789253bb46511d57a916a67d3c0c1500 (patch)
tree4b24f5d92caab8f4e429089e80fc75f1523b2024
parent33894612c0de953b75b41dbfcc643986e4ac177e (diff)
parent914923d125f5d17b39b4dc05f666d130e80a68b2 (diff)
Merge #15709: wallet: Do not add "setting" key as unknown
914923d125f5d17b39b4dc05f666d130e80a68b2 Add setting as known type (Peter Bushnell) Pull request description: When loading old wallets I get "Unknown wallet records" showing up in the log file. The key that is adding to the unknown record count is "setting", this is a known key removed in the 0.6 release of Bitcoin in the commit linked below. The "setting" key is not known to the wallet anymore, like "acentry" which is not added as an unknown record, but the "setting" key was used in previous versions of Bitcoin. https://github.com/bitcoin/bitcoin/commit/972060ce0e9746c979ce0ddeeb997121414c1d58#diff-8094838580e1bb7a3bb8fc78dcebc733 ACKs for top commit: laanwj: ACK 914923d125f5d17b39b4dc05f666d130e80a68b2, this code change is straightforward enough and I don't think it makes sense to warn about this key being present. meshcollider: ACK 914923d125f5d17b39b4dc05f666d130e80a68b2 Tree-SHA512: 6346690c05cebae2dcd868512322bf5250f6fbd07abb5e747065444185d3f69e19e1a99e3f38d6e34535ffd6979b2297100ba9c7da8e45ca792598eded5ae0d3
-rw-r--r--src/wallet/walletdb.cpp4
-rw-r--r--src/wallet/walletdb.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 987665c9da..9f467c0f5a 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -40,6 +40,7 @@ const std::string OLD_KEY{"wkey"};
const std::string ORDERPOSNEXT{"orderposnext"};
const std::string POOL{"pool"};
const std::string PURPOSE{"purpose"};
+const std::string SETTINGS{"settings"};
const std::string TX{"tx"};
const std::string VERSION{"version"};
const std::string WATCHMETA{"watchmeta"};
@@ -407,7 +408,8 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
return false;
}
} else if (strType != DBKeys::BESTBLOCK && strType != DBKeys::BESTBLOCK_NOMERKLE &&
- strType != DBKeys::MINVERSION && strType != DBKeys::ACENTRY && strType != DBKeys::VERSION) {
+ strType != DBKeys::MINVERSION && strType != DBKeys::ACENTRY &&
+ strType != DBKeys::VERSION && strType != DBKeys::SETTINGS) {
wss.m_unknown_records++;
}
} catch (const std::exception& e) {
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index b78bc49f9e..0fee35934d 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -74,6 +74,7 @@ extern const std::string OLD_KEY;
extern const std::string ORDERPOSNEXT;
extern const std::string POOL;
extern const std::string PURPOSE;
+extern const std::string SETTINGS;
extern const std::string TX;
extern const std::string VERSION;
extern const std::string WATCHMETA;