aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/golomb_rice.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-12-01 14:40:25 -0500
committerPieter Wuille <pieter@wuille.net>2021-12-02 14:47:17 -0500
commit2c35a93b3cc19dc71d5664f9f61c24a04f419e35 (patch)
tree78a40228722d72de583ab39bbc932c186ec5fb39 /src/test/fuzz/golomb_rice.cpp
parent26a1147ce56083d7aa820ac115c16b01e47d911c (diff)
Generalize/simplify VectorReader into SpanReader
Diffstat (limited to 'src/test/fuzz/golomb_rice.cpp')
-rw-r--r--src/test/fuzz/golomb_rice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/fuzz/golomb_rice.cpp b/src/test/fuzz/golomb_rice.cpp
index c99bf940c7..7b4634c67b 100644
--- a/src/test/fuzz/golomb_rice.cpp
+++ b/src/test/fuzz/golomb_rice.cpp
@@ -82,8 +82,8 @@ FUZZ_TARGET(golomb_rice)
std::vector<uint64_t> decoded_deltas;
{
- VectorReader stream{SER_NETWORK, 0, golomb_rice_data, 0};
- BitStreamReader<VectorReader> bitreader(stream);
+ SpanReader stream{SER_NETWORK, 0, golomb_rice_data, 0};
+ BitStreamReader<SpanReader> bitreader{stream};
const uint32_t n = static_cast<uint32_t>(ReadCompactSize(stream));
for (uint32_t i = 0; i < n; ++i) {
decoded_deltas.push_back(GolombRiceDecode(bitreader, BASIC_FILTER_P));
@@ -94,14 +94,14 @@ FUZZ_TARGET(golomb_rice)
{
const std::vector<uint8_t> random_bytes = ConsumeRandomLengthByteVector(fuzzed_data_provider, 1024);
- VectorReader stream{SER_NETWORK, 0, random_bytes, 0};
+ SpanReader stream{SER_NETWORK, 0, random_bytes, 0};
uint32_t n;
try {
n = static_cast<uint32_t>(ReadCompactSize(stream));
} catch (const std::ios_base::failure&) {
return;
}
- BitStreamReader<VectorReader> bitreader(stream);
+ BitStreamReader<SpanReader> bitreader{stream};
for (uint32_t i = 0; i < std::min<uint32_t>(n, 1024); ++i) {
try {
(void)GolombRiceDecode(bitreader, BASIC_FILTER_P);