aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/utxo_snapshot.cpp
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2024-05-24 11:41:42 +0200
committerFabian Jahr <fjahr@protonmail.com>2024-05-24 18:44:02 +0200
commit6b6084850b8c2ebcdbeecdb406e8732adaa6d23c (patch)
tree022358038c15bdce9b18fc77dfda2b92861af34f /src/test/fuzz/utxo_snapshot.cpp
parent1f1f9984555d49f07ae20cb3a8153a177c546beb (diff)
assumeutxo: Add network magic ctor param to SnapshotMetadata
This prevents SnapshotMetadata from using any globals implicitly.
Diffstat (limited to 'src/test/fuzz/utxo_snapshot.cpp')
-rw-r--r--src/test/fuzz/utxo_snapshot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/fuzz/utxo_snapshot.cpp b/src/test/fuzz/utxo_snapshot.cpp
index dce728d96b..8c9c67a91c 100644
--- a/src/test/fuzz/utxo_snapshot.cpp
+++ b/src/test/fuzz/utxo_snapshot.cpp
@@ -47,7 +47,8 @@ FUZZ_TARGET(utxo_snapshot, .init = initialize_chain)
const auto ActivateFuzzedSnapshot{[&] {
AutoFile infile{fsbridge::fopen(snapshot_path, "rb")};
- SnapshotMetadata metadata;
+ auto msg_start = Params().MessageStart();
+ SnapshotMetadata metadata{msg_start};
try {
infile >> metadata;
} catch (const std::ios_base::failure&) {