mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 03:03:58 +01:00
[wallet] Add wallet name to log messages
After multiple wallets became supported, wallet-related log messages became ambiguous as to which wallet they were being emitted by. fixes #11317
This commit is contained in:
@@ -545,7 +545,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
|
||||
Dbc* pcursor = m_batch.GetCursor();
|
||||
if (!pcursor)
|
||||
{
|
||||
LogPrintf("Error getting wallet database cursor\n");
|
||||
pwallet->WalletLogPrintf("Error getting wallet database cursor\n");
|
||||
return DBErrors::CORRUPT;
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
|
||||
break;
|
||||
else if (ret != 0)
|
||||
{
|
||||
LogPrintf("Error reading next record from wallet database\n");
|
||||
pwallet->WalletLogPrintf("Error reading next record from wallet database\n");
|
||||
return DBErrors::CORRUPT;
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
|
||||
}
|
||||
}
|
||||
if (!strErr.empty())
|
||||
LogPrintf("%s\n", strErr);
|
||||
pwallet->WalletLogPrintf("%s\n", strErr);
|
||||
}
|
||||
pcursor->close();
|
||||
}
|
||||
@@ -602,9 +602,9 @@ DBErrors WalletBatch::LoadWallet(CWallet* pwallet)
|
||||
if (result != DBErrors::LOAD_OK)
|
||||
return result;
|
||||
|
||||
LogPrintf("nFileVersion = %d\n", wss.nFileVersion);
|
||||
pwallet->WalletLogPrintf("nFileVersion = %d\n", wss.nFileVersion);
|
||||
|
||||
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
|
||||
pwallet->WalletLogPrintf("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
|
||||
|
||||
Reference in New Issue
Block a user