diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-05-20 10:51:17 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-06-09 17:52:23 -0300 |
commit | 3b2c61e8198bcefb1c2343caff1d705951026cc4 (patch) | |
tree | c4ad99b748548d76a15ffaf32d9dad44c774e1ec /src/node/interfaces.cpp | |
parent | 3c06926cf21dcca3074ef51506f556b2286c299b (diff) |
Return EXIT_FAILURE on post-init fatal errors
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.
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
Diffstat (limited to 'src/node/interfaces.cpp')
-rw-r--r-- | src/node/interfaces.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 6e39ccf34e..bf42167c2f 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -92,7 +92,7 @@ public: uint32_t getLogCategories() override { return LogInstance().GetCategoryMask(); } bool baseInitialize() override { - if (!AppInitBasicSetup(args())) return false; + if (!AppInitBasicSetup(args(), Assert(context())->exit_status)) return false; if (!AppInitParameterInteraction(args(), /*use_syscall_sandbox=*/false)) return false; m_context->kernel = std::make_unique<kernel::Context>(); |