mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
log: Use LogWarning for non-critical logs
As per doc/developer-notes#logging, LogWarning should be used for severe problems that do not warrant shutting down the node
This commit is contained in:
@@ -240,7 +240,7 @@ bool LegacyDataSPKM::CheckDecryptionKey(const CKeyingMaterial& master_key)
|
||||
}
|
||||
if (keyPass && keyFail)
|
||||
{
|
||||
LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");
|
||||
LogWarning("The wallet is probably corrupted: Some keys decrypt but not all.");
|
||||
throw std::runtime_error("Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
|
||||
}
|
||||
if (keyFail || !keyPass)
|
||||
@@ -570,7 +570,7 @@ std::optional<MigrationData> LegacyDataSPKM::MigrateToDescriptor()
|
||||
|
||||
WalletBatch batch(m_storage.GetDatabase());
|
||||
if (!batch.TxnBegin()) {
|
||||
LogPrintf("Error generating descriptors for migration, cannot initialize db transaction\n");
|
||||
LogWarning("Error generating descriptors for migration, cannot initialize db transaction");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ std::optional<MigrationData> LegacyDataSPKM::MigrateToDescriptor()
|
||||
|
||||
// Finalize transaction
|
||||
if (!batch.TxnCommit()) {
|
||||
LogPrintf("Error generating descriptors for migration, cannot commit db transaction\n");
|
||||
LogWarning("Error generating descriptors for migration, cannot commit db transaction");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ bool DescriptorScriptPubKeyMan::CheckDecryptionKey(const CKeyingMaterial& master
|
||||
break;
|
||||
}
|
||||
if (keyPass && keyFail) {
|
||||
LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");
|
||||
LogWarning("The wallet is probably corrupted: Some keys decrypt but not all.");
|
||||
throw std::runtime_error("Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
|
||||
}
|
||||
if (keyFail || !keyPass) {
|
||||
|
||||
Reference in New Issue
Block a user