aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-05-07 18:10:48 +0000
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-16 11:47:32 +0200
commit1569353b8aa535f086833acb6223650972c89790 (patch)
treeff2ec0a2cab43aa46aabe4bbd9b770ac09fa29ee
parent0075337020d4cf8614c40b2c98c0bbef124bbc56 (diff)
Add `-stopafterblockimport` option
Stop after importing blocks. This can be useful for development and trouble shooting.
-rw-r--r--src/init.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 39453da9c8..0a0b479fa2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -273,6 +273,7 @@ std::string HelpMessage(HelpMessageMode hmm)
strUsage += " -dropmessagestest=<n> " + _("Randomly drop 1 of every <n> network messages") + "\n";
strUsage += " -fuzzmessagestest=<n> " + _("Randomly fuzz 1 of every <n> network messages") + "\n";
strUsage += " -flushwallet " + _("Run a thread to flush wallet periodically (default: 1)") + "\n";
+ strUsage += " -stopafterblockimport " + _("Stop running after importing blocks from disk (default: 0)") + "\n";
}
strUsage += " -debug=<category> " + _("Output debugging information (default: 0, supplying <category> is optional)") + "\n";
strUsage += " " + _("If <category> is not supplied, output all debugging information.") + "\n";
@@ -404,6 +405,11 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
LogPrintf("Warning: Could not open blocks file %s\n", path.string());
}
}
+
+ if (GetBoolArg("-stopafterblockimport", false)) {
+ LogPrintf("Stopping after block import\n");
+ StartShutdown();
+ }
}
/** Sanity checks