diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-10-22 22:45:26 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-11-09 01:06:32 +0100 |
commit | 7a5b7535bf3b987c5e2157f25c8b3246033d952e (patch) | |
tree | 540a9fc5dd1996546818a10f9e61e02cbccf5c31 /src/main.cpp | |
parent | 05d9726805969ff155e8a029579113f05529ea82 (diff) | |
download | bitcoin-7a5b7535bf3b987c5e2157f25c8b3246033d952e.tar.xz |
Move ThreadImport to init.cpp
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7a9a32a626..64adae8edd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2532,50 +2532,6 @@ bool LoadExternalBlockFile(FILE* fileIn) return nLoaded > 0; } -struct CImportingNow -{ - CImportingNow() { - assert(fImporting == false); - fImporting = true; - } - - ~CImportingNow() { - assert(fImporting == true); - fImporting = false; - } -}; - -void ThreadImport(void *data) { - std::vector<boost::filesystem::path> *vFiles = reinterpret_cast<std::vector<boost::filesystem::path>*>(data); - - RenameThread("bitcoin-loadblk"); - - CImportingNow imp; - vnThreadsRunning[THREAD_IMPORT]++; - - // -loadblock= - BOOST_FOREACH(boost::filesystem::path &path, *vFiles) { - FILE *file = fopen(path.string().c_str(), "rb"); - if (file) - LoadExternalBlockFile(file); - } - - // hardcoded $DATADIR/bootstrap.dat - filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; - if (filesystem::exists(pathBootstrap)) { - FILE *file = fopen(pathBootstrap.string().c_str(), "rb"); - if (file) { - filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old"; - LoadExternalBlockFile(file); - RenameOver(pathBootstrap, pathBootstrapOld); - } - } - - delete vFiles; - - vnThreadsRunning[THREAD_IMPORT]--; -} - |