aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/util.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-07-04 16:38:51 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-07-04 21:28:35 +0200
commitfab99865c0e62468a1b55d7e467398cc2343121b (patch)
tree6e598c5e9b8c18109a50ba927360ede4beba7da9 /src/test/fuzz/util.h
parentfa40c0964b751683774b79da4b72d330a9ff87e2 (diff)
fuzz: Improve ConsumeTxDestination
* Assert when a type is missing * Add missing WitnessV1Taproot * Limit WitnessUnknown to version [2, 16], to avoid abiguity * Limit WitnessUnknown to size [2, 40], to avoid invalid sizes
Diffstat (limited to 'src/test/fuzz/util.h')
-rw-r--r--src/test/fuzz/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h
index 60dc9050fe..9f09395a9a 100644
--- a/src/test/fuzz/util.h
+++ b/src/test/fuzz/util.h
@@ -37,7 +37,7 @@
#include <vector>
template <typename... Callables>
-void CallOneOf(FuzzedDataProvider& fuzzed_data_provider, Callables... callables)
+size_t CallOneOf(FuzzedDataProvider& fuzzed_data_provider, Callables... callables)
{
constexpr size_t call_size{sizeof...(callables)};
static_assert(call_size >= 1);
@@ -45,6 +45,7 @@ void CallOneOf(FuzzedDataProvider& fuzzed_data_provider, Callables... callables)
size_t i{0};
((i++ == call_index ? callables() : void()), ...);
+ return call_size;
}
template <typename Collection>