|
39 | 39 | #include <script/standard.h>
|
40 | 40 | #include <script/sigcache.h>
|
41 | 41 | #include <scheduler.h>
|
| 42 | +#include <utilthreadnames.h> |
42 | 43 | #include <timedata.h>
|
43 | 44 | #include <txdb.h>
|
44 | 45 | #include <txmempool.h>
|
@@ -243,7 +244,7 @@ void PrepareShutdown()
|
243 | 244 | /// for example if the data directory was found to be locked.
|
244 | 245 | /// Be sure that anything that writes files or flushes caches only does this if the respective
|
245 | 246 | /// module was initialized.
|
246 |
| - RenameThread("dash-shutoff"); |
| 247 | + util::ThreadRename("shutoff"); |
247 | 248 | mempool.AddTransactionsUpdated(1);
|
248 | 249 | StopHTTPRPC();
|
249 | 250 | StopREST();
|
@@ -606,6 +607,7 @@ void SetupServerArgs()
|
606 | 607 | gArgs.AddArg("-llmqinstantsend=<quorum name>", strprintf("Override the default LLMQ type used for InstantSend on a devnet. Allows using InstantSend with smaller LLMQs. (default: %s)", devnetConsensus.llmqs.at(devnetConsensus.llmqTypeInstantSend).name), false, OptionsCategory::DEBUG_TEST);
|
607 | 608 | gArgs.AddArg("-llmqtestparams=<size:threshold>", strprintf("Override the default LLMQ size for the LLMQ_TEST quorum (default: %u:%u)", regtestLLMQ.size, regtestLLMQ.threshold), false, OptionsCategory::DEBUG_TEST);
|
608 | 609 | gArgs.AddArg("-logips", strprintf("Include IP addresses in debug output (default: %u)", DEFAULT_LOGIPS), false, OptionsCategory::DEBUG_TEST);
|
| 610 | + gArgs.AddArg("-logtimestamps", strprintf("Prepend debug output with timestamp (default: %u)", DEFAULT_LOGTIMESTAMPS), false, OptionsCategory::DEBUG_TEST); |
609 | 611 | gArgs.AddArg("-logthreadnames", strprintf("Add thread names to debug messages (default: %u)", DEFAULT_LOGTHREADNAMES), true, OptionsCategory::DEBUG_TEST);
|
610 | 612 | gArgs.AddArg("-logtimemicros", strprintf("Add microsecond precision to debug timestamps (default: %u)", DEFAULT_LOGTIMEMICROS), true, OptionsCategory::DEBUG_TEST);
|
611 | 613 | gArgs.AddArg("-maxsigcachesize=<n>", strprintf("Limit sum of signature cache and script execution cache sizes to <n> MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE), true, OptionsCategory::DEBUG_TEST);
|
@@ -774,7 +776,7 @@ static void CleanupBlockRevFiles()
|
774 | 776 | static void ThreadImport(std::vector<fs::path> vImportFiles)
|
775 | 777 | {
|
776 | 778 | const CChainParams& chainparams = Params();
|
777 |
| - RenameThread("dash-loadblk"); |
| 779 | + util::ThreadRename("loadblk"); |
778 | 780 | ScheduleBatchPriority();
|
779 | 781 |
|
780 | 782 | {
|
@@ -1092,7 +1094,7 @@ void InitLogging()
|
1092 | 1094 | g_logger->m_print_to_console = gArgs.GetBoolArg("-printtoconsole", !gArgs.GetBoolArg("-daemon", false));
|
1093 | 1095 | g_logger->m_log_timestamps = gArgs.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS);
|
1094 | 1096 | g_logger->m_log_time_micros = gArgs.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS);
|
1095 |
| - g_logger->m_log_thread_names = gArgs.GetBoolArg("-logthreadnames", DEFAULT_LOGTHREADNAMES); |
| 1097 | + g_logger->m_log_threadnames = gArgs.GetBoolArg("-logthreadnames", DEFAULT_LOGTHREADNAMES); |
1096 | 1098 |
|
1097 | 1099 | fLogIPs = gArgs.GetBoolArg("-logips", DEFAULT_LOGIPS);
|
1098 | 1100 |
|
@@ -1731,7 +1733,7 @@ bool AppInitMain()
|
1731 | 1733 | LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
|
1732 | 1734 | if (nScriptCheckThreads) {
|
1733 | 1735 | for (int i=0; i<nScriptCheckThreads-1; i++)
|
1734 |
| - threadGroup.create_thread(&ThreadScriptCheck); |
| 1736 | + threadGroup.create_thread([i]() { return ThreadScriptCheck(i); }); |
1735 | 1737 | }
|
1736 | 1738 |
|
1737 | 1739 | std::vector<std::string> vSporkAddresses;
|
|
0 commit comments