aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormerge-script <fanquake@gmail.com>2024-09-02 11:59:56 +0100
committermerge-script <fanquake@gmail.com>2024-09-02 11:59:56 +0100
commitd4cc0c684518b3db11c333ff97d82e170c8b86b8 (patch)
tree1adda4519e276cc04d4d2faf883fe6a77caa0a37 /doc
parentef6f49ecaf42c2abf3d3b52ed7c3158339e4abe1 (diff)
parentfa09cb41f58d0483ffe134eb274b9048c5260faa (diff)
Merge bitcoin/bitcoin#30750: scripted-diff: LogPrint -> LogDebug
fa09cb41f58d0483ffe134eb274b9048c5260faa refactor: Remove unused LogPrint (MarcoFalke) 333341589010b1d9b21b68ae6649992fd2653756 scripted-diff: LogPrint -> LogDebug (MarcoFalke) Pull request description: `LogPrint` has many issues: * It seems to indicate that something is being "printed", however config options such as `-printtoconsole` actually control what and where something is logged. * It does not mention the log severity (debug). * It is a deprecated alias for `LogDebug`, according to the dev notes. * It wastes review cycles, because reviewers sometimes point out that it is deprecated. * It makes the code inconsistent, when both are used, possibly even in lines right next to each other (like in `InitHTTPServer`) Fix all issues by removing the deprecated alias. I checked all conflicting pull requests and at the time of writing there are no conflicts, except in pull requests that are marked as draft, are yet unreviewed, or are blocked on feedback for other reasons. So I think it is fine to do now. ACKs for top commit: stickies-v: ACK fa09cb41f58d0483ffe134eb274b9048c5260faa danielabrozzoni: utACK fa09cb41f58d0483ffe134eb274b9048c5260faa TheCharlatan: ACK fa09cb41f58d0483ffe134eb274b9048c5260faa Tree-SHA512: 14270f4cfa3906025a0b994cbb5b2e3c8c2427c0beb19c717a505a2ccbfb1fd1ecf2fd03f6c52d22cde69a8d057e50d2207119fab2c2bc8228db3f10d4288d0f
Diffstat (limited to 'doc')
-rw-r--r--doc/developer-notes.md2
-rw-r--r--doc/fuzzing.md4
2 files changed, 2 insertions, 4 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 99c263bed5..33ab2c72f3 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -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
diff --git a/doc/fuzzing.md b/doc/fuzzing.md
index ffc6a04964..4da9f5c3a2 100644
--- a/doc/fuzzing.md
+++ b/doc/fuzzing.md
@@ -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