Merge pull request #5933

3455efa ban peers sending bad pow outright (moneromooo-monero)
This commit is contained in:
luigi1111 2019-10-14 18:07:54 -05:00
commit dc48cdc998
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
9 changed files with 25 additions and 15 deletions

View file

@ -1723,6 +1723,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;
}
@ -3749,6 +3750,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;
}
}