mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-01 11:11:22 +00:00
-BEGIN VERIFY SCRIPT- sed --in-place --regexp-extended \ 's;( 20[0-2][0-9])(-20[0-2][0-9])? The Bitcoin Core developers;\1-present The Bitcoin Core developers;g' \ $( git grep -l 'The Bitcoin Core developers' -- ':(exclude)COPYING' ':(exclude)src/ipc/libmultiprocess' ':(exclude)src/minisketch' ) -END VERIFY SCRIPT-
28 lines
910 B
C++
28 lines
910 B
C++
// Copyright (c) 2023-present The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <node/abort.h>
|
|
|
|
#include <logging.h>
|
|
#include <node/interface_ui.h>
|
|
#include <node/warnings.h>
|
|
#include <util/signalinterrupt.h>
|
|
#include <util/translation.h>
|
|
|
|
#include <atomic>
|
|
#include <cstdlib>
|
|
|
|
namespace node {
|
|
|
|
void AbortNode(const std::function<bool()>& shutdown_request, std::atomic<int>& exit_status, const bilingual_str& message, node::Warnings* warnings)
|
|
{
|
|
if (warnings) warnings->Set(Warning::FATAL_INTERNAL_ERROR, message);
|
|
InitError(_("A fatal internal error occurred, see debug.log for details: ") + message);
|
|
exit_status.store(EXIT_FAILURE);
|
|
if (shutdown_request && !shutdown_request()) {
|
|
LogError("Failed to send shutdown signal\n");
|
|
};
|
|
}
|
|
} // namespace node
|