mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
kernel: Add fatalError method to notifications
FatalError replaces what previously was the AbortNode function in shutdown.cpp. This commit is part of the libbitcoinkernel project and further removes the shutdown's and, more generally, the kernel library's dependency on interface_ui with a kernel notification method. By removing interface_ui from the kernel library, its dependency on boost is reduced to just boost::multi_index. At the same time it also takes a step towards de-globalising the interrupt infrastructure. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: TheCharlatan <seb.kung@gmail.com>
This commit is contained in:
parent
7320db96f8
commit
6eb33bd0c2
19 changed files with 128 additions and 90 deletions
|
|
@ -10,8 +10,12 @@
|
|||
|
||||
#include <common/args.h>
|
||||
#include <common/system.h>
|
||||
#include <kernel/context.h>
|
||||
#include <logging.h>
|
||||
#include <node/abort.h>
|
||||
#include <node/interface_ui.h>
|
||||
#include <shutdown.h>
|
||||
#include <util/check.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
#include <util/translation.h>
|
||||
|
|
@ -75,7 +79,12 @@ void KernelNotifications::warning(const bilingual_str& warning)
|
|||
|
||||
void KernelNotifications::flushError(const std::string& debug_message)
|
||||
{
|
||||
AbortNode(debug_message);
|
||||
AbortNode(m_exit_status, debug_message);
|
||||
}
|
||||
|
||||
void KernelNotifications::fatalError(const std::string& debug_message, const bilingual_str& user_message)
|
||||
{
|
||||
node::AbortNode(m_exit_status, debug_message, user_message, m_shutdown_on_fatal_error);
|
||||
}
|
||||
|
||||
} // namespace node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue