MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / DeserializeFromFuzzingInput

Function DeserializeFromFuzzingInput

src/test/fuzz/deserialize.cpp:77–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76template <typename T, typename P>
77void DeserializeFromFuzzingInput(FuzzBufferType buffer, T&& obj, const P& params)
78{
79 try {
80 SpanReader{buffer} >> params(obj);
81 } catch (const std::ios_base::failure&) {
82 throw invalid_fuzzing_input_exception();
83 }
84 assert(buffer.empty() || !Serialize(obj, params).empty());
85}
86
87template <typename T>
88DataStream Serialize(const T& obj)

Callers 1

deserialize.cppFile · 0.85

Calls 3

SerializeFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected