diff --git a/libethcore/Ethasher.cpp b/libethcore/Ethasher.cpp index 1e6f0acef..79a2fdea3 100644 --- a/libethcore/Ethasher.cpp +++ b/libethcore/Ethasher.cpp @@ -119,9 +119,21 @@ bool Ethasher::verify(BlockInfo const& _header) boundary.data()); #if ETH_DEBUG - // should be equivalent to: auto result = eval(_header); - assert((result.mixHash == _header.mixHash && result.value <= boundary) == ret); + if ((result.value <= boundary && result.mixHash == _header.mixHash) != ret) + { + cwarn << "Assertion failure coming: evaluated result gives different outcome to ethash_quick_check_difficulty"; + cwarn << "headerHash:" << _header.headerHash(WithoutNonce); + cwarn << "nonce:" << _header.nonce; + cwarn << "mixHash:" << _header.mixHash; + cwarn << "difficulty:" << _header.difficulty; + cwarn << "boundary:" << boundary; + cwarn << "result.value:" << result.value; + cwarn << "result.mixHash:" << result.mixHash; + } + assert((result.value <= boundary) == ret); + if (result.value <= boundary) + assert(result.mixHash == _header.mixHash); #endif return ret;