aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-04-12 09:17:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-04-12 09:17:45 +0200
commit39439e5ab4195bb1abebd2c8b1ac702bc33c2e60 (patch)
tree8161041eb7746d0f97d4ba7d65fea821740b8eff /src/wallet/walletdb.cpp
parente561cf4fa865a89254e2e6839b3ef343e06951a2 (diff)
parent72ec5b77668fcbd838dbd19723728af2c9a97208 (diff)
Merge #12888: debug log number of unknown wallet records on load
72ec5b7 debug log number of unknown wallet records on load (Gregory Sanders) Pull request description: This would have saved me some time during wallet debugging, with minimal logging clutter. Tree-SHA512: e11a4d73a5b1d2bd73fe7b75b62fdfa127e21b8641c5b0c76f14ecd292ab374c0d4749f6bd99919b2b3e9cb00c3b5e8179386eb39ac656698306b3b545ee79f1
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r--src/wallet/walletdb.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 803cc5f0a0..bcc7cf877d 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -232,13 +232,14 @@ public:
unsigned int nCKeys;
unsigned int nWatchKeys;
unsigned int nKeyMeta;
+ unsigned int m_unknown_records;
bool fIsEncrypted;
bool fAnyUnordered;
int nFileVersion;
std::vector<uint256> vWalletUpgrade;
CWalletScanState() {
- nKeys = nCKeys = nWatchKeys = nKeyMeta = 0;
+ nKeys = nCKeys = nWatchKeys = nKeyMeta = m_unknown_records = 0;
fIsEncrypted = false;
fAnyUnordered = false;
nFileVersion = 0;
@@ -509,6 +510,8 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
strErr = "Error reading wallet database: SetHDChain failed";
return false;
}
+ } else if (strType != "bestblock" && strType != "bestblock_nomerkle"){
+ wss.m_unknown_records++;
}
} catch (...)
{
@@ -600,8 +603,8 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
LogPrintf("nFileVersion = %d\n", wss.nFileVersion);
- LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total\n",
- wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys);
+ LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
+ wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys, wss.m_unknown_records);
// nTimeFirstKey is only reliable if all keys have metadata
if ((wss.nKeys + wss.nCKeys + wss.nWatchKeys) != wss.nKeyMeta)