From faec3dc2adc487af97c22408f9f0bfe33f44a230 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 27 Apr 2020 15:36:05 -0400 Subject: init: Remove boost from ThreadImport --- src/init.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index a213dacbe..3e2ee4d42 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -708,6 +708,10 @@ static void ThreadImport(std::vector vImportFiles) break; // This error is logged in OpenBlockFile LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile); LoadExternalBlockFile(chainparams, file, &pos); + if (ShutdownRequested()) { + LogPrintf("Shutdown requested. Exit %s\n", __func__); + return; + } nFile++; } pblocktree->WriteReindexing(false); @@ -723,6 +727,10 @@ static void ThreadImport(std::vector vImportFiles) if (file) { LogPrintf("Importing blocks file %s...\n", path.string()); LoadExternalBlockFile(chainparams, file); + if (ShutdownRequested()) { + LogPrintf("Shutdown requested. Exit %s\n", __func__); + return; + } } else { LogPrintf("Warning: Could not open blocks file %s\n", path.string()); } -- cgit v1.2.3