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:
MarcoFalke
2025-11-26 17:13:09 +01:00
parent fa0018d011
commit fa45a1503e
23 changed files with 116 additions and 115 deletions

View File

@@ -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) {