In commit "gui: return EXIT_FAILURE on post-init fatal errors" (624340f9acbdd3c2d54c3824248e2c0cff4cf487)
Not necessary to address here, but with #10102 when the node and GUI are running in separate processes, m_node->context() will be null, so this will crash.
You could fix and future-proof this by adding a interfaces::Node::setExitStatus() function, or just update the existing appInitMain() function to set the error code:
bool appInitMain(interfaces::BlockAndHeaderTipInfo* tip_info) override
{
if (!AppInitMain(*m_context, tip_info)) {
m_context->exit_status.store(EXIT_FAILURE);
return false;
}
return true;
}
If you let appInitMain set the error code, you could also simplify GUI code even more, skipping Q_EMIT initializeResult(rv, tip_info) when appInitMain fails and getting rid of the rv parameter.