Skip to content

Commit 77fabff

Browse files
committed
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 bitcoin/bitcoin#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.)
1 parent 0e55bc6 commit 77fabff

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/init.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ void Shutdown(NodeContext& node)
320320
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, fsbridge::get_filesystem_error_message(e));
321321
}
322322

323-
node.args = nullptr;
324323
LogPrintf("%s: done\n", __func__);
325324
}
326325

0 commit comments

Comments
 (0)