diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-06-12 12:13:55 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-06-12 12:54:49 -0400 |
commit | c92fd638860c5b4477851fb3790bc8068f808d3e (patch) | |
tree | 063d1c5002af6f03f8a7a3a460314ee2eb3049dc /src/init.cpp | |
parent | 361a0c00b3fdac7149c027c2c69e4db60ee5aa86 (diff) | |
parent | 61c569ab6069d04079a0831468eb713983919636 (diff) |
Merge bitcoin/bitcoin#27708: Return EXIT_FAILURE on post-init fatal errors
61c569ab6069d04079a0831468eb713983919636 refactor: decouple early return commands from AppInit (furszy)
4927167f855f8ed3bbf6d2766f61229f742e632a gui: return EXIT_FAILURE on post-init fatal errors (furszy)
3b2c61e8198bcefb1c2343caff1d705951026cc4 Return EXIT_FAILURE on post-init fatal errors (furszy)
3c06926cf21dcca3074ef51506f556b2286c299b refactor: index: use `AbortNode` in fatal error helper (Sebastian Falbesoner)
9ddf7e03a35592617a016418fd320cc93c8d1abd move ThreadImport ABC error to use AbortNode (furszy)
Pull request description:
It seems odd to return `EXIT_SUCCESS` when the node aborted execution due a fatal internal error
or any post-init problem that triggers an unrequested shutdown.
e.g. blocks or coins db I/O errors, disconnect block failure, failure during thread import (external
blocks loading process error), among others.
ACKs for top commit:
TheCharlatan:
ACK 61c569ab6069d04079a0831468eb713983919636
ryanofsky:
Code review ACK 61c569ab6069d04079a0831468eb713983919636
pinheadmz:
ACK 61c569ab6069d04079a0831468eb713983919636
theStack:
Code-review ACK 61c569ab6069d04079a0831468eb713983919636
Tree-SHA512: 18a59c3acc1c6d12cbc74a20a401e89659740c6477fccb59070c9f97922dfe588468e9e5eef56c5f395762187c34179a5e3954aa5b844787fa13da2e666c63d3
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index e8c804b9a7..38e1dbb4a2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -800,7 +800,7 @@ std::set<BlockFilterType> g_enabled_filter_types; std::terminate(); }; -bool AppInitBasicSetup(const ArgsManager& args) +bool AppInitBasicSetup(const ArgsManager& args, std::atomic<int>& exit_status) { // ********************************************************* Step 1: setup #ifdef _MSC_VER @@ -814,7 +814,7 @@ bool AppInitBasicSetup(const ArgsManager& args) // Enable heap terminate-on-corruption HeapSetInformation(nullptr, HeapEnableTerminationOnCorruption, nullptr, 0); #endif - if (!InitShutdownState()) { + if (!InitShutdownState(exit_status)) { return InitError(Untranslated("Initializing wait-for-shutdown state failed.")); } |