blockchain: fix misleading request chain error logs
What changed, and why it matters
This commit only changes two error log messages in Monero's blockchain code. It removes the phrase 'dropping connection' from messages that are printed when a peer sends an invalid chain request. The actual behavior—returning false and not dropping the connection—was already in place; the logs were simply inaccurate. There is no security fix here.
No security action needed. Treat as a routine log-message cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/cryptonote_core/blockchain.cpp, two MCERROR log lines in find_blockchain_supplement() are edited to remove the trailing ‘dropping connection’ text. The function already returns false in both error branches and does not disconnect the peer. The change is cosmetic/log-message-only and does not alter control flow, network behavior, or validation logic.
Changed components
src/cryptonote_core/blockchain.cppfind_blockchain_supplement()Inspect captured patch +2 / −2
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 0ea9ee7..872ece8 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2438,7 +2438,7 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc
// how can we expect to sync from the client that the block list came from?
if(qblock_ids.empty())
{
- MCERROR("net.p2p", "Client sent wrong NOTIFY_REQUEST_CHAIN: m_block_ids.size()=" << qblock_ids.size() << ", dropping connection");
+ MCERROR("net.p2p", "Client sent wrong NOTIFY_REQUEST_CHAIN: m_block_ids.size()=" << qblock_ids.size());
return false;
}
@@ -2448,7 +2448,7 @@ bool Blockchain::find_blockchain_supplement(const std::list<crypto::hash>& qbloc
auto gen_hash = m_db->get_block_hash_from_height(0);
if(qblock_ids.back() != gen_hash)
{
- MCERROR("net.p2p", "Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block mismatch: " << std::endl << "id: " << qblock_ids.back() << ", " << std::endl << "expected: " << gen_hash << "," << std::endl << " dropping connection");
+ MCERROR("net.p2p", "Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block mismatch: " << std::endl << "id: " << qblock_ids.back() << ", " << std::endl << "expected: " << gen_hash);
return false;
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.