diff options
| author | MarcoFalke <[email protected]> | 2020-04-27 15:36:05 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-04-27 15:35:26 -0400 |
| commit | faec3dc2adc487af97c22408f9f0bfe33f44a230 (patch) | |
| tree | 7c93eb80a80b73100424d2dce8269ae5045abb8d /src/init.cpp | |
| parent | Merge #18669: log: Use Join() helper when listing log categories (diff) | |
| download | discoin-faec3dc2adc487af97c22408f9f0bfe33f44a230.tar.xz discoin-faec3dc2adc487af97c22408f9f0bfe33f44a230.zip | |
init: Remove boost from ThreadImport
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<fs::path> 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<fs::path> 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()); } |