blockchain: fix misleading request chain error logs

This commit is contained in:
selsta
2026-07-10 16:26:06 +02:00
parent d46a05e8c8
commit c9a18b96cb
+2 -2
View File
@@ -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;
}