diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-05-09 11:15:46 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-06-28 09:52:33 +0200 |
commit | 6eb33bd0c21b3e075fbab596351cacafdc947472 (patch) | |
tree | 70c9082689cd178c864faa39bec9b02ea1ac028b /src/node/abort.h | |
parent | 7320db96f8d2aeff0bc5dc67d8b7b37f5f808990 (diff) |
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>
Diffstat (limited to 'src/node/abort.h')
-rw-r--r-- | src/node/abort.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/node/abort.h b/src/node/abort.h new file mode 100644 index 0000000000..d6bb0c14d5 --- /dev/null +++ b/src/node/abort.h @@ -0,0 +1,17 @@ +// 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 <util/translation.h> + +#include <atomic> +#include <string> + +namespace node { +void AbortNode(std::atomic<int>& exit_status, const std::string& debug_message, const bilingual_str& user_message = {}, bool shutdown = true); +} // namespace node + +#endif // BITCOIN_NODE_ABORT_H |