File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 14
14
#include < test/fuzz/fuzz.h>
15
15
#include < test/fuzz/util.h>
16
16
#include < test/util/setup_common.h>
17
+ #include < txdb.h>
17
18
#include < util/hasher.h>
18
19
19
20
#include < cassert>
@@ -41,12 +42,10 @@ void initialize_coins_view()
41
42
static const auto testing_setup = MakeNoLogFileContext<>();
42
43
}
43
44
44
- FUZZ_TARGET (coins_view, .init = initialize_coins_view )
45
+ void TestCoinsView (FuzzedDataProvider& fuzzed_data_provider, CCoinsView& backend_coins_view )
45
46
{
46
- FuzzedDataProvider fuzzed_data_provider{buffer.data (), buffer.size ()};
47
47
bool good_data{true };
48
48
49
- CCoinsView backend_coins_view;
50
49
CCoinsViewCache coins_view_cache{&backend_coins_view, /* deterministic=*/ true };
51
50
COutPoint random_out_point;
52
51
Coin random_coin;
@@ -294,3 +293,10 @@ FUZZ_TARGET(coins_view, .init = initialize_coins_view)
294
293
});
295
294
}
296
295
}
296
+
297
+ FUZZ_TARGET (coins_view, .init = initialize_coins_view)
298
+ {
299
+ FuzzedDataProvider fuzzed_data_provider{buffer.data (), buffer.size ()};
300
+ CCoinsView backend_coins_view;
301
+ TestCoinsView (fuzzed_data_provider, backend_coins_view);
302
+ }
You can’t perform that action at this time.
0 commit comments