mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
21 lines
531 B
C++
21 lines
531 B
C++
// Copyright (c) 2023 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_NODE_ABORT_H
|
|
#define BITCOIN_NODE_ABORT_H
|
|
|
|
#include <atomic>
|
|
|
|
struct bilingual_str;
|
|
|
|
namespace util {
|
|
class SignalInterrupt;
|
|
} // namespace util
|
|
|
|
namespace node {
|
|
void AbortNode(util::SignalInterrupt* shutdown, std::atomic<int>& exit_status, const bilingual_str& message);
|
|
} // namespace node
|
|
|
|
#endif // BITCOIN_NODE_ABORT_H
|