diff --git a/src/test/fuzz/bitset.cpp b/src/test/fuzz/bitset.cpp index 98fcddfb8dd..76843377292 100644 --- a/src/test/fuzz/bitset.cpp +++ b/src/test/fuzz/bitset.cpp @@ -12,8 +12,8 @@ namespace { -/** Pop the first byte from a Span, and return it. */ -uint8_t ReadByte(Span& buffer) +/** Pop the first byte from a byte-span, and return it. */ +uint8_t ReadByte(FuzzBufferType& buffer) { if (buffer.empty()) return 0; uint8_t ret = buffer.front(); @@ -23,7 +23,7 @@ uint8_t ReadByte(Span& buffer) /** Perform a simulation fuzz test on BitSet type S. */ template -void TestType(Span buffer) +void TestType(FuzzBufferType buffer) { /** This fuzz test's design is based on the assumption that the actual bits stored in the * bitsets and their simulations do not matter for the purpose of detecting edge cases, thus diff --git a/src/test/fuzz/fuzz.h b/src/test/fuzz/fuzz.h index ca74d53de77..c468cd39e3d 100644 --- a/src/test/fuzz/fuzz.h +++ b/src/test/fuzz/fuzz.h @@ -5,10 +5,9 @@ #ifndef BITCOIN_TEST_FUZZ_FUZZ_H #define BITCOIN_TEST_FUZZ_FUZZ_H -#include - #include #include +#include #include /** @@ -23,7 +22,7 @@ #define LIMITED_WHILE(condition, limit) \ for (unsigned _count{limit}; (condition) && _count; --_count) -using FuzzBufferType = Span; +using FuzzBufferType = std::span; using TypeTestOneInput = std::function; struct FuzzTargetOptions {