aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-01-24 08:49:11 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-01-24 08:49:17 +0100
commit973c39029808a20b9afc244559a92e9d700d3824 (patch)
tree649aedc9056849bf86afd99dfb5cdb1bb45fdc6d /src/test
parent6d859cbd794a36ed1c0c72324a4ec54d029b3d3b (diff)
parent224d87855ec38cc15866d9673e1b19942a82c1cd (diff)
downloadbitcoin-973c39029808a20b9afc244559a92e9d700d3824.tar.xz
Merge bitcoin/bitcoin#24078: net, refactor: Rename CNetMessage::m_command with CNetMessage::m_type
224d87855ec38cc15866d9673e1b19942a82c1cd net, refactor: Drop tautological local variables (Hennadii Stepanov) 3073a9917b31d15ba958ea8148585633ba905f8b scripted-diff: Rename CNetMessage::m_command with CNetMessage::m_type (Hennadii Stepanov) Pull request description: https://github.com/bitcoin/bitcoin/pull/18533#issue-594592488: > a message is not a command, but simply a message of some type Continuation of bitcoin/bitcoin#18533 and bitcoin/bitcoin#18937. ACKs for top commit: theStack: Concept and code-review ACK 224d87855ec38cc15866d9673e1b19942a82c1cd shaavan: Code Review ACK 224d87855ec38cc15866d9673e1b19942a82c1cd w0xlt: crACK 224d878 Tree-SHA512: 898cafb44708dae1413fcc1533d809d75878891354f1b5edaaec1287f4921c31adc9330f4d42d82544a39689886bc17fee71ea587f9199fd5cc849d376f82176
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/p2p_transport_serialization.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/p2p_transport_serialization.cpp b/src/test/fuzz/p2p_transport_serialization.cpp
index a7b2b8bfc1..88c22ca305 100644
--- a/src/test/fuzz/p2p_transport_serialization.cpp
+++ b/src/test/fuzz/p2p_transport_serialization.cpp
@@ -70,13 +70,13 @@ FUZZ_TARGET_INIT(p2p_transport_serialization, initialize_p2p_transport_serializa
const std::chrono::microseconds m_time{std::numeric_limits<int64_t>::max()};
bool reject_message{false};
CNetMessage msg = deserializer.GetMessage(m_time, reject_message);
- assert(msg.m_command.size() <= CMessageHeader::COMMAND_SIZE);
+ assert(msg.m_type.size() <= CMessageHeader::COMMAND_SIZE);
assert(msg.m_raw_message_size <= mutable_msg_bytes.size());
assert(msg.m_raw_message_size == CMessageHeader::HEADER_SIZE + msg.m_message_size);
assert(msg.m_time == m_time);
std::vector<unsigned char> header;
- auto msg2 = CNetMsgMaker{msg.m_recv.GetVersion()}.Make(msg.m_command, MakeUCharSpan(msg.m_recv));
+ auto msg2 = CNetMsgMaker{msg.m_recv.GetVersion()}.Make(msg.m_type, MakeUCharSpan(msg.m_recv));
serializer.prepareForTransport(msg2, header);
}
}