mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-11 16:17:54 +02:00
Merge bitcoin/bitcoin#30255: log: use error level for critical log messages
fae3a1f006log: use error level for critical log messages (MarcoFalke) Pull request description: This picks up the first commit from https://github.com/bitcoin/bitcoin/pull/29231, but extends it to also cover cases that were missed in it. As per https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#logging, LogError should be used for severe problems that require the node to shut down. ACKs for top commit: stickies-v: re-ACKfae3a1f006, I'm ~0 on the latest force push as `user_error` was already logged at the right level through `GetNotifications().fatalError(user_error);` so I'd be in favour of deduplicating/cleaning up this logging logic but can be done in follow-up. kevkevinpal: ACK [fae3a1f](fae3a1f006) achow101: ACKfae3a1f006Tree-SHA512: 3f99fd25d5a204d570a42d8fb2b450439aad7685692f9594cc813d97253c4df172a6ff3cf818959bfcf25dfcf8ee9a9c9ccc6028fcfcecdb47591e18c77ef246
This commit is contained in:
@@ -5967,8 +5967,8 @@ SnapshotCompletionResult ChainstateManager::MaybeCompleteSnapshotValidation()
|
||||
PACKAGE_NAME, snapshot_tip_height, snapshot_base_height, snapshot_base_height, PACKAGE_BUGREPORT
|
||||
);
|
||||
|
||||
LogPrintf("[snapshot] !!! %s\n", user_error.original);
|
||||
LogPrintf("[snapshot] deleting snapshot, reverting to validated chain, and stopping node\n");
|
||||
LogError("[snapshot] !!! %s\n", user_error.original);
|
||||
LogError("[snapshot] deleting snapshot, reverting to validated chain, and stopping node\n");
|
||||
|
||||
m_active_chainstate = m_ibd_chainstate.get();
|
||||
m_snapshot_chainstate->m_disabled = true;
|
||||
@@ -6320,7 +6320,7 @@ bool ChainstateManager::ValidatedSnapshotCleanup()
|
||||
fs::path p_old,
|
||||
fs::path p_new,
|
||||
const fs::filesystem_error& err) {
|
||||
LogPrintf("Error renaming path (%s) -> (%s): %s\n",
|
||||
LogError("[snapshot] Error renaming path (%s) -> (%s): %s\n",
|
||||
fs::PathToString(p_old), fs::PathToString(p_new), err.what());
|
||||
GetNotifications().fatalError(strprintf(_(
|
||||
"Rename of '%s' -> '%s' failed. "
|
||||
|
||||
Reference in New Issue
Block a user