diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-01-02 19:29:36 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-02-03 19:30:14 +0100 |
commit | faf7d7418cf01cb04cd457bcc630654da958a777 (patch) | |
tree | 7adaeeef624d4921c6895b715197a5dcf47b2ac7 /src/test/fuzz/deserialize.cpp | |
parent | ea96e17e1f2c2b0a949366260906ef02e560a425 (diff) | |
download | bitcoin-faf7d7418cf01cb04cd457bcc630654da958a777.tar.xz |
fuzz: Avoid extraneous copy of input data, using Span<>
Diffstat (limited to 'src/test/fuzz/deserialize.cpp')
-rw-r--r-- | src/test/fuzz/deserialize.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index 74dec6475e..ba5f0c1a75 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -30,8 +30,6 @@ #include <stdint.h> #include <unistd.h> -#include <vector> - #include <test/fuzz/fuzz.h> void initialize_deserialize() @@ -71,7 +69,7 @@ T Deserialize(CDataStream ds) } template <typename T> -void DeserializeFromFuzzingInput(const std::vector<uint8_t>& buffer, T& obj, const Optional<int> protocol_version = nullopt) +void DeserializeFromFuzzingInput(FuzzBufferType buffer, T& obj, const Optional<int> protocol_version = nullopt) { CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION); if (protocol_version) { |