aboutsummaryrefslogtreecommitdiff
path: root/src/test/util
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-06-06 17:22:59 +0200
committerMacroFake <falke.marco@gmail.com>2022-06-29 10:33:13 +0200
commitfacc2fa7b8a218a0df6a19772e1641ea68dda2e3 (patch)
treec2e5cf39dd2c0b88517a8bb2a83d7ca2bba2c360 /src/test/util
parent6666803c897e4ad27b45cb74e3a9aa74a335f1bf (diff)
downloadbitcoin-facc2fa7b8a218a0df6a19772e1641ea68dda2e3.tar.xz
Use AutoFile where possible
Diffstat (limited to 'src/test/util')
-rw-r--r--src/test/util/chainstate.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/util/chainstate.h b/src/test/util/chainstate.h
index 5ac504c24f..13e0e684b8 100644
--- a/src/test/util/chainstate.h
+++ b/src/test/util/chainstate.h
@@ -16,7 +16,7 @@
#include <boost/test/unit_test.hpp>
-const auto NoMalleation = [](CAutoFile& file, node::SnapshotMetadata& meta){};
+const auto NoMalleation = [](AutoFile& file, node::SnapshotMetadata& meta){};
/**
* Create and activate a UTXO snapshot, optionally providing a function to
@@ -32,7 +32,7 @@ CreateAndActivateUTXOSnapshot(node::NodeContext& node, const fs::path root, F ma
WITH_LOCK(::cs_main, height = node.chainman->ActiveHeight());
fs::path snapshot_path = root / fs::u8path(tfm::format("test_snapshot.%d.dat", height));
FILE* outfile{fsbridge::fopen(snapshot_path, "wb")};
- CAutoFile auto_outfile{outfile, SER_DISK, CLIENT_VERSION};
+ AutoFile auto_outfile{outfile};
UniValue result = CreateUTXOSnapshot(
node, node.chainman->ActiveChainstate(), auto_outfile, snapshot_path, snapshot_path);
@@ -42,7 +42,7 @@ CreateAndActivateUTXOSnapshot(node::NodeContext& node, const fs::path root, F ma
// Read the written snapshot in and then activate it.
//
FILE* infile{fsbridge::fopen(snapshot_path, "rb")};
- CAutoFile auto_infile{infile, SER_DISK, CLIENT_VERSION};
+ AutoFile auto_infile{infile};
node::SnapshotMetadata metadata;
auto_infile >> metadata;