mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-07 08:50:26 +02:00
refactor: Remove unused LogPrint
This commit is contained in:
@ -741,8 +741,6 @@ logging messages. They should be used as follows:
|
||||
useful for debugging and can reasonably be enabled on a production
|
||||
system (that has sufficient free storage space). They will be logged
|
||||
if the program is started with `-debug=category` or `-debug=1`.
|
||||
Note that `LogPrint(BCLog::CATEGORY, fmt, params...)` is a deprecated
|
||||
alias for `LogDebug`.
|
||||
|
||||
- `LogInfo(fmt, params...)` should only be used rarely, e.g. for startup
|
||||
messages or for infrequent and important events such as a new block tip
|
||||
|
@ -257,7 +257,7 @@ index 7601a6ea84..702d0f56ce 100644
|
||||
// Check start string, network magic
|
||||
- if (memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) {
|
||||
+ if (false && memcmp(hdr.pchMessageStart, m_chain_params.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) { // skip network magic checking
|
||||
LogPrint(BCLog::NET, "Header error: Wrong MessageStart %s received, peer=%d\n", HexStr(hdr.pchMessageStart), m_node_id);
|
||||
LogDebug(BCLog::NET, "Header error: Wrong MessageStart %s received, peer=%d\n", HexStr(hdr.pchMessageStart), m_node_id);
|
||||
return -1;
|
||||
}
|
||||
@@ -788,7 +788,7 @@ CNetMessage V1TransportDeserializer::GetMessage(const std::chrono::microseconds
|
||||
@ -266,7 +266,7 @@ index 7601a6ea84..702d0f56ce 100644
|
||||
// Check checksum and header message type string
|
||||
- if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) {
|
||||
+ if (false && memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0) { // skip checksum checking
|
||||
LogPrint(BCLog::NET, "Header error: Wrong checksum (%s, %u bytes), expected %s was %s, peer=%d\n",
|
||||
LogDebug(BCLog::NET, "Header error: Wrong checksum (%s, %u bytes), expected %s was %s, peer=%d\n",
|
||||
SanitizeString(msg.m_type), msg.m_message_size,
|
||||
HexStr(Span{hash}.first(CMessageHeader::CHECKSUM_SIZE)),
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user