aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-06-17 14:50:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-06-17 14:51:15 +0200
commit5694d1078172822caa8f43c1f535e7a9e423b8e3 (patch)
tree1da445959824eee87c6acd0002658cb84dc0075c
parent2151419b1b124c490a09692f3bc234e82295a7c0 (diff)
parent1569353b8aa535f086833acb6223650972c89790 (diff)
Merge pull request #4346
1569353 Add `-stopafterblockimport` option (Wladimir J. van der Laan)
-rw-r--r--src/init.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index dd5e4cf3b0..6ad2c58c8f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -274,6 +274,7 @@ std::string HelpMessage(HelpMessageMode mode)
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";
@@ -405,6 +406,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