Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | V1TransportDeserializer::GetMessage(const Config &config, | ||||
msg.m_valid_checksum = (memcmp(hash.begin(), hdr.pchChecksum, | msg.m_valid_checksum = (memcmp(hash.begin(), hdr.pchChecksum, | ||||
CMessageHeader::CHECKSUM_SIZE) == 0); | CMessageHeader::CHECKSUM_SIZE) == 0); | ||||
if (!msg.m_valid_checksum) { | if (!msg.m_valid_checksum) { | ||||
LogPrint( | LogPrint( | ||||
BCLog::NET, "CHECKSUM ERROR (%s, %u bytes), expected %s was %s\n", | BCLog::NET, "CHECKSUM ERROR (%s, %u bytes), expected %s was %s\n", | ||||
SanitizeString(msg.m_command), msg.m_message_size, | SanitizeString(msg.m_command), msg.m_message_size, | ||||
HexStr(hash.begin(), hash.begin() + CMessageHeader::CHECKSUM_SIZE), | HexStr(Span<uint8_t>(hash.begin(), | ||||
HexStr(hdr.pchChecksum, | hash.begin() + CMessageHeader::CHECKSUM_SIZE)), | ||||
hdr.pchChecksum + CMessageHeader::CHECKSUM_SIZE)); | HexStr(hdr.pchChecksum)); | ||||
} | } | ||||
// store receive time | // store receive time | ||||
msg.m_time = time; | msg.m_time = time; | ||||
// reset the network deserializer (prepare for the next message) | // reset the network deserializer (prepare for the next message) | ||||
Reset(); | Reset(); | ||||
return msg; | return msg; | ||||
▲ Show 20 Lines • Show All 2,410 Lines • Show Last 20 Lines |