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 1414#include < test/fuzz/fuzz.h>
1515#include < test/fuzz/util.h>
1616#include < test/util/setup_common.h>
17+ #include < txdb.h>
1718#include < util/hasher.h>
1819
1920#include < cassert>
@@ -41,12 +42,10 @@ void initialize_coins_view()
4142 static const auto testing_setup = MakeNoLogFileContext<>();
4243}
4344
44- FUZZ_TARGET (coins_view, .init = initialize_coins_view )
45+ void TestCoinsView (FuzzedDataProvider& fuzzed_data_provider, CCoinsView& backend_coins_view )
4546{
46- FuzzedDataProvider fuzzed_data_provider{buffer.data (), buffer.size ()};
4747 bool good_data{true };
4848
49- CCoinsView backend_coins_view;
5049 CCoinsViewCache coins_view_cache{&backend_coins_view, /* deterministic=*/ true };
5150 COutPoint random_out_point;
5251 Coin random_coin;
@@ -294,3 +293,10 @@ FUZZ_TARGET(coins_view, .init = initialize_coins_view)
294293 });
295294 }
296295}
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