1
0
Fork 0
forked from lthn/blockchain

added ip blacklisting on unexpected block id

This commit is contained in:
cryptozoidberg 2025-03-24 07:21:52 +04:00
parent 5984b47ad9
commit ef9a0ab5fd
No known key found for this signature in database
GPG key ID: 2E10CC61CAC8F36D

View file

@ -561,6 +561,7 @@ namespace currency
LOG_ERROR_CCONTEXT("sent wrong NOTIFY_RESPONSE_GET_OBJECTS: block with id=" << epst::pod_to_hex(get_blob_hash(block_entry.block))
<< " wasn't requested, dropping connection");
m_p2p->drop_connection(context);
m_p2p->add_ip_fail(context.m_remote_ip);
return 1;
}
if(b.tx_hashes.size() != block_entry.txs.size())