diff --git a/src/init.cpp b/src/init.cpp index dd5e4cf3b..6ad2c58c8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -274,6 +274,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -dropmessagestest= " + _("Randomly drop 1 of every network messages") + "\n"; strUsage += " -fuzzmessagestest= " + _("Randomly fuzz 1 of every 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= " + _("Output debugging information (default: 0, supplying is optional)") + "\n"; strUsage += " " + _("If is not supplied, output all debugging information.") + "\n"; @@ -405,6 +406,11 @@ void ThreadImport(std::vector 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