mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
node: Make translations of fatal errors consistent
The extra `bilingual_str` argument of the fatal error notifications and `node::AbortNode()` is often unused and when used usually contains the same string as the message argument. It also seems to be confusing, since it is not consistently used for errors requiring user action. For example some assumeutxo fatal errors require the user to do something, but are not translated. So simplify the fatal error and abort node interfaces by only passing a translated string. This slightly changes the fatal errors displayed to the user. Also de-duplicate the abort error log since it is repeated in noui.cpp.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class ArgsManager;
|
||||
class CBlockIndex;
|
||||
@@ -37,9 +36,9 @@ public:
|
||||
|
||||
void warning(const bilingual_str& warning) override;
|
||||
|
||||
void flushError(const std::string& debug_message) override;
|
||||
void flushError(const bilingual_str& message) override;
|
||||
|
||||
void fatalError(const std::string& debug_message, const bilingual_str& user_message = {}) override;
|
||||
void fatalError(const bilingual_str& message) override;
|
||||
|
||||
//! Block height after which blockTip notification will return Interrupted{}, if >0.
|
||||
int m_stop_at_height{DEFAULT_STOPATHEIGHT};
|
||||
|
||||
Reference in New Issue
Block a user