diff options
author | Troy Giorshev <troygiorshev@gmail.com> | 2020-05-26 17:01:57 -0400 |
---|---|---|
committer | Troy Giorshev <troygiorshev@gmail.com> | 2020-09-22 22:05:18 -0400 |
commit | deb52711a17236d0fca302701b5af585341ab42a (patch) | |
tree | 992c541c6fa43979adcf0436a01064ce497c1a84 /src/test/fuzz/deserialize.cpp | |
parent | 52d4ae46ab822d0f54e246a6f2364415cda149bd (diff) | |
download | bitcoin-deb52711a17236d0fca302701b5af585341ab42a.tar.xz |
Remove header checks out of net_processing
This moves header size and netmagic checking out of net_processing and
into net. This check now runs in ReadHeader, so that net can exit early
out of receiving bytes from the peer. IsValid is now slimmed down, so
it no longer needs a MessageStartChars& parameter.
Additionally this removes the rest of the m_valid_* members from
CNetMessage.
Diffstat (limited to 'src/test/fuzz/deserialize.cpp')
-rw-r--r-- | src/test/fuzz/deserialize.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index f87b7576a4..b799d3b43b 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -189,10 +189,9 @@ void test_one_input(const std::vector<uint8_t>& buffer) DeserializeFromFuzzingInput(buffer, s); AssertEqualAfterSerializeDeserialize(s); #elif MESSAGEHEADER_DESERIALIZE - const CMessageHeader::MessageStartChars pchMessageStart = {0x00, 0x00, 0x00, 0x00}; CMessageHeader mh; DeserializeFromFuzzingInput(buffer, mh); - (void)mh.IsValid(pchMessageStart); + (void)mh.IsCommandValid(); #elif ADDRESS_DESERIALIZE CAddress a; DeserializeFromFuzzingInput(buffer, a); |