mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
init: Remove Shutdown() node.args reset
This commit removes the `node.args = nullptr` assignment in the Shutdown() function. Clearing node.args there never made sense because it made the Shutdown() function not idempotent, making it fragile and causing issues like https://github.com/bitcoin/bitcoin/issues/23186. The assignment also causes segfaults in GUI unit tests when a new node().initParameterInteraction() call is added in OptionsModel to apply to Qt settings (happens because AppTests calls Shutdown() which sets node.args to null, and OptionTests runs after AppTests and then needs node.args not to be null.)
This commit is contained in:
parent
0e55bc6e7f
commit
77fabffef4
@ -320,7 +320,6 @@ void Shutdown(NodeContext& node)
|
||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, fsbridge::get_filesystem_error_message(e));
|
||||
}
|
||||
|
||||
node.args = nullptr;
|
||||
LogPrintf("%s: done\n", __func__);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user