diff options
author | TheCharlatan <seb.kung@gmail.com> | 2024-03-15 21:42:44 +0100 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2024-03-21 16:40:22 +0100 |
commit | ddc7872c08b7ddf9b1e83abdb97c21303f4a9172 (patch) | |
tree | c63f192aea2ef0dc8e14532720afbea46f21853a /src/node/kernel_notifications.h | |
parent | b50554babdddf452acaa51bac757736766c70e81 (diff) | |
download | bitcoin-ddc7872c08b7ddf9b1e83abdb97c21303f4a9172.tar.xz |
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.
Diffstat (limited to 'src/node/kernel_notifications.h')
-rw-r--r-- | src/node/kernel_notifications.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node/kernel_notifications.h b/src/node/kernel_notifications.h index 38d8600ac6..f4d97a0fff 100644 --- a/src/node/kernel_notifications.h +++ b/src/node/kernel_notifications.h @@ -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}; |