aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/p2p_transport_deserializer.cpp
diff options
context:
space:
mode:
authorTroy Giorshev <troygiorshev@gmail.com>2020-06-08 22:37:55 -0400
committerTroy Giorshev <troygiorshev@gmail.com>2020-09-22 22:01:14 -0400
commit5bceef6b12fa16d20287693be377dace3dfec3e5 (patch)
tree0a6fee9b1bdea143702adc97cc01a3a4a2a7928a /src/test/fuzz/p2p_transport_deserializer.cpp
parent1ca20c1af8f08f07c407c3183c37b467ddf0f413 (diff)
Change CMessageHeader Constructor
This commit removes the single-parameter contructor of CMessageHeader and replaces it with a default constructor. The single parameter contructor isn't used anywhere except for tests. There is no reason to initialize a CMessageHeader with a particular messagestart. This messagestart should always be replaced when deserializing an actual message header so that we can run checks on it. The default constructor initializes it to zero, just like the command and checksum. This also removes a parameter of a V1TransportDeserializer constructor, as it was only used for this purpose.
Diffstat (limited to 'src/test/fuzz/p2p_transport_deserializer.cpp')
-rw-r--r--src/test/fuzz/p2p_transport_deserializer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/p2p_transport_deserializer.cpp b/src/test/fuzz/p2p_transport_deserializer.cpp
index 3e9cd3af38..5349fd3f68 100644
--- a/src/test/fuzz/p2p_transport_deserializer.cpp
+++ b/src/test/fuzz/p2p_transport_deserializer.cpp
@@ -20,7 +20,7 @@ void initialize()
void test_one_input(const std::vector<uint8_t>& buffer)
{
// Construct deserializer, with a dummy NodeId
- V1TransportDeserializer deserializer{Params().MessageStart(), (NodeId)0, SER_NETWORK, INIT_PROTO_VERSION};
+ V1TransportDeserializer deserializer{(NodeId)0, SER_NETWORK, INIT_PROTO_VERSION};
const char* pch = (const char*)buffer.data();
size_t n_bytes = buffer.size();
while (n_bytes > 0) {