mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Make BufferedFile to be a CAutoFile wrapper
This refactor allows to forward some calls to the underlying CAutoFile, instead of re-implementing the logic in the buffered file.
This commit is contained in:
parent
fa389d902f
commit
9999b89cd3
9 changed files with 23 additions and 27 deletions
|
|
@ -1020,7 +1020,7 @@ void ImportBlocks(ChainstateManager& chainman, std::vector<fs::path> vImportFile
|
|||
break; // This error is logged in OpenBlockFile
|
||||
}
|
||||
LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile);
|
||||
chainman.LoadExternalBlockFile(file.Get(), &pos, &blocks_with_unknown_parent);
|
||||
chainman.LoadExternalBlockFile(file, &pos, &blocks_with_unknown_parent);
|
||||
if (chainman.m_interrupt) {
|
||||
LogPrintf("Interrupt requested. Exit %s\n", __func__);
|
||||
return;
|
||||
|
|
@ -1039,7 +1039,7 @@ void ImportBlocks(ChainstateManager& chainman, std::vector<fs::path> vImportFile
|
|||
CAutoFile file{fsbridge::fopen(path, "rb"), CLIENT_VERSION};
|
||||
if (!file.IsNull()) {
|
||||
LogPrintf("Importing blocks file %s...\n", fs::PathToString(path));
|
||||
chainman.LoadExternalBlockFile(file.Get());
|
||||
chainman.LoadExternalBlockFile(file);
|
||||
if (chainman.m_interrupt) {
|
||||
LogPrintf("Interrupt requested. Exit %s\n", __func__);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue