diff --git a/src/side_chain.cpp b/src/side_chain.cpp index 6cc81b3..e34c2d4 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -602,13 +602,21 @@ bool SideChain::add_external_block(PoolBlock& block, std::vector& missing_ ", mainchain height = " << block.m_txinGenHeight ); + bool not_enough_pow = true; + // Calculate the same hash second time to check if it's an unstable hardware that caused this hash pow_hash2; if (block.get_pow_hash(m_pool->hasher(), block.m_txinGenHeight, seed, pow_hash2, true) && (pow_hash2 != pow_hash)) { LOGERR(0, "UNSTABLE HARDWARE DETECTED: Calculated the same hash twice, got different results: " << pow_hash << " != " << pow_hash2 << " (sidechain id = " << block.m_sidechainId << ')'); + if (block.m_difficulty.check_pow(pow_hash2)) { + LOGINFO(3, "add_external_block second result has enough PoW for height = " << block.m_sidechainHeight << ", id = " << block.m_sidechainId); + not_enough_pow = false; + } } - return false; + if (not_enough_pow) { + return false; + } } bool block_found = false;