Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 767 Lines • ▼ Show 20 Lines | pwallet->WalletLogPrintf("Wallet File Version = %d\n", | ||||
wallet_version > 0 ? wallet_version : last_client); | wallet_version > 0 ? wallet_version : last_client); | ||||
pwallet->WalletLogPrintf("Keys: %u plaintext, %u encrypted, %u w/ " | pwallet->WalletLogPrintf("Keys: %u plaintext, %u encrypted, %u w/ " | ||||
"metadata, %u total. Unknown wallet records: %u\n", | "metadata, %u total. Unknown wallet records: %u\n", | ||||
wss.nKeys, wss.nCKeys, wss.nKeyMeta, | wss.nKeys, wss.nCKeys, wss.nKeyMeta, | ||||
wss.nKeys + wss.nCKeys, wss.m_unknown_records); | wss.nKeys + wss.nCKeys, wss.m_unknown_records); | ||||
// nTimeFirstKey is only reliable if all keys have metadata | // nTimeFirstKey is only reliable if all keys have metadata | ||||
if ((wss.nKeys + wss.nCKeys + wss.nWatchKeys) != wss.nKeyMeta) { | if (pwallet->IsLegacy() && | ||||
(wss.nKeys + wss.nCKeys + wss.nWatchKeys) != wss.nKeyMeta) { | |||||
auto spk_man = pwallet->GetOrCreateLegacyScriptPubKeyMan(); | auto spk_man = pwallet->GetOrCreateLegacyScriptPubKeyMan(); | ||||
if (spk_man) { | if (spk_man) { | ||||
LOCK(spk_man->cs_KeyStore); | LOCK(spk_man->cs_KeyStore); | ||||
spk_man->UpdateTimeFirstKey(1); | spk_man->UpdateTimeFirstKey(1); | ||||
} | } | ||||
} | } | ||||
for (const TxId &txid : wss.vWalletUpgrade) { | for (const TxId &txid : wss.vWalletUpgrade) { | ||||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |