Similar to #28019. The following instruction is outdated and doesn’t work:
0$ git apply << "EOF"
1diff --git a/src/compat/compat.h b/src/compat/compat.h
2index 8195bceaec..cce2b31ff0 100644
3--- a/src/compat/compat.h
4+++ b/src/compat/compat.h
5@@ -90,8 +90,12 @@ typedef char* sockopt_arg_type;
6 // building with a binutils < 2.36 is subject to this ld bug.
7 #define MAIN_FUNCTION __declspec(dllexport) int main(int argc, char* argv[])
8 #else
9+#ifdef HFND_FUZZING_ENTRY_FUNCTION_CXX
10+#define MAIN_FUNCTION HFND_FUZZING_ENTRY_FUNCTION_CXX(int argc, char* argv[])
11+#else
12 #define MAIN_FUNCTION int main(int argc, char* argv[])
13 #endif
14+#endif
15
16 // Note these both should work with the current usage of poll, but best to be safe
17 // WIN32 poll is broken https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/
18diff --git a/src/net.cpp b/src/net.cpp
19index 7601a6ea84..702d0f56ce 100644
20--- a/src/net.cpp
21+++ b/src/net.cpp
22@@ -727,7 +727,7 @@ int V1TransportDeserializer::readHeader(Span<const uint8_t> msg_bytes)
23 }
24
25 // Check start string, network magic
26- if (memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) {
27+ if (false && memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) { // skip network magic checking
28 LogDebug(BCLog::NET, "Header error: Wrong MessageStart %s received, peer=%d\n", HexStr(hdr.pchMessageStart), m_node_id);
29 return -1;
30 }
31@@ -788,7 +788,7 @@ CNetMessage V1TransportDeserializer::GetMessage(const std::chrono::microseconds
32 RandAddEvent(ReadLE32(hash.begin()));
33
34 // Check checksum and header message type string
35- if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) {
36+ if (false && memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) { // skip checksum checking
37 LogDebug(BCLog::NET, "Header error: Wrong checksum (%s, %u bytes), expected %s was %s, peer=%d\n",
38 SanitizeString(msg.m_type), msg.m_message_size,
39 HexStr(Span{hash}.first(CMessageHeader::CHECKSUM_SIZE)),
40EOF