aboutsummaryrefslogtreecommitdiff
path: root/src/bench/load_external.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bench/load_external.cpp')
-rw-r--r--src/bench/load_external.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bench/load_external.cpp b/src/bench/load_external.cpp
index 252cbb163b..7cfade9c79 100644
--- a/src/bench/load_external.cpp
+++ b/src/bench/load_external.cpp
@@ -5,6 +5,7 @@
#include <bench/bench.h>
#include <bench/data.h>
#include <chainparams.h>
+#include <clientversion.h>
#include <test/util/setup_common.h>
#include <util/chaintype.h>
#include <validation.h>
@@ -54,8 +55,8 @@ static void LoadExternalBlockFile(benchmark::Bench& bench)
bench.run([&] {
// "rb" is "binary, O_RDONLY", positioned to the start of the file.
// The file will be closed by LoadExternalBlockFile().
- FILE* file{fsbridge::fopen(blkfile, "rb")};
- testing_setup->m_node.chainman->LoadExternalBlockFile(file, &pos, &blocks_with_unknown_parent);
+ CAutoFile file{fsbridge::fopen(blkfile, "rb"), CLIENT_VERSION};
+ testing_setup->m_node.chainman->LoadExternalBlockFile(file.Get(), &pos, &blocks_with_unknown_parent);
});
fs::remove(blkfile);
}