From 3455efafa812d646f2eea42db14b761f34975147 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 24 Sep 2019 13:08:25 +0000 Subject: ban peers sending bad pow outright PoW is expensive to verify, so be strict --- src/cryptonote_core/blockchain.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_core/blockchain.cpp') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 5cf4952ae..584dfbe71 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1689,6 +1689,7 @@ bool Blockchain::handle_alternative_block(const block& b, const crypto::hash& id { MERROR_VER("Block with id: " << id << std::endl << " for alternative chain, does not have enough proof of work: " << proof_of_work << std::endl << " expected difficulty: " << current_diff); bvc.m_verifivation_failed = true; + bvc.m_bad_pow = true; return false; } @@ -3620,6 +3621,7 @@ leave: { MERROR_VER("Block with id: " << id << std::endl << "does not have enough proof of work: " << proof_of_work << " at height " << blockchain_height << ", unexpected difficulty: " << current_diffic); bvc.m_verifivation_failed = true; + bvc.m_bad_pow = true; goto leave; } } -- cgit v1.2.3