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/p2p_transport_deserializer.cpp | |
parent | 52d4ae46ab822d0f54e246a6f2364415cda149bd (diff) |
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/p2p_transport_deserializer.cpp')
-rw-r--r-- | src/test/fuzz/p2p_transport_deserializer.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/test/fuzz/p2p_transport_deserializer.cpp b/src/test/fuzz/p2p_transport_deserializer.cpp index 6252b8e91b..7e216e16fe 100644 --- a/src/test/fuzz/p2p_transport_deserializer.cpp +++ b/src/test/fuzz/p2p_transport_deserializer.cpp @@ -39,12 +39,6 @@ void test_one_input(const std::vector<uint8_t>& buffer) assert(result->m_raw_message_size <= buffer.size()); assert(result->m_raw_message_size == CMessageHeader::HEADER_SIZE + result->m_message_size); assert(result->m_time == m_time); - if (result->m_valid_header) { - assert(result->m_valid_netmagic); - } - if (!result->m_valid_netmagic) { - assert(!result->m_valid_header); - } } } } |