aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-15 17:39:32 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-15 17:41:56 -0400
commit544709763e1f45148d1926831e07ff03487673ee (patch)
treefab6ea4898f8670ab6e7cf415976ae5f67f13514 /src/init.cpp
parente84a5f000493fe39adb2a5f22b43c3848dcd0a4f (diff)
parentfa69f88486e900aacf3fc768671f947927173226 (diff)
Merge #18571: fuzz: Disable debug log file
fa69f88486e900aacf3fc768671f947927173226 fuzz: Disable debug log file (MarcoFalke) fa0cbd48c418ec14e1d91bffea206bce20bd1e56 test: Add optional extra_args to testing setup (MarcoFalke) fad4fa7e2fb95b7ced9007060ebfd0e8f181f5d8 node: Add args alias for gArgs global (MarcoFalke) Pull request description: There are several issues with writing to a debug log file when fuzzing: * Disk access is slow, but fuzzing should be fast (Note: I could not verify this claim with data) * Disks have a limited size and will eventually run out of space, but fuzzing should run continuous Fix both issues by disabling the debug log file for fuzz tests ACKs for top commit: practicalswift: ACK fa69f88486e900aacf3fc768671f947927173226 -- patch looks correct Tree-SHA512: f61beb6c94a9ab664deb191685fcad601e228b77bb1c43db6ec40616ae393c9dd35c51474f1b0759ac0bc29b5ca8456a329906a3695bd0f18fa4372210c8b54a
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index de2db694fd..de32c0ad71 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -297,6 +297,7 @@ void Shutdown(NodeContext& node)
GetMainSignals().UnregisterBackgroundSignalScheduler();
globalVerifyHandle.reset();
ECC_Stop();
+ node.args = nullptr;
if (node.mempool) node.mempool = nullptr;
node.scheduler.reset();
@@ -360,8 +361,11 @@ static void OnRPCStopped()
LogPrint(BCLog::RPC, "RPC stopped.\n");
}
-void SetupServerArgs()
+void SetupServerArgs(NodeContext& node)
{
+ assert(!node.args);
+ node.args = &gArgs;
+
SetupHelpOptions(gArgs);
gArgs.AddArg("-help-debug", "Print help message with debugging options and exit", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); // server-only for now