mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-28 18:19:31 +01:00
validation: Move LoadExternalBlockFile to CChainState
[META] This commit should be followed up by removing the comments and
assertions meant only to show that the change is correct.
LoadExternalBlockFile mainly acts on CChainState.
This commit is contained in:
@@ -705,7 +705,7 @@ static void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImp
|
||||
if (!file)
|
||||
break; // This error is logged in OpenBlockFile
|
||||
LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile);
|
||||
LoadExternalBlockFile(chainparams, file, &pos);
|
||||
::ChainstateActive().LoadExternalBlockFile(chainparams, file, &pos);
|
||||
if (ShutdownRequested()) {
|
||||
LogPrintf("Shutdown requested. Exit %s\n", __func__);
|
||||
return;
|
||||
@@ -724,7 +724,7 @@ static void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImp
|
||||
FILE *file = fsbridge::fopen(path, "rb");
|
||||
if (file) {
|
||||
LogPrintf("Importing blocks file %s...\n", path.string());
|
||||
LoadExternalBlockFile(chainparams, file);
|
||||
::ChainstateActive().LoadExternalBlockFile(chainparams, file);
|
||||
if (ShutdownRequested()) {
|
||||
LogPrintf("Shutdown requested. Exit %s\n", __func__);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user