Skip to content

Commit 9c92ab7

Browse files
SetCompact -> SetCompactBase256
1 parent 3679b8e commit 9c92ab7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/validation.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3814,9 +3814,10 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, BlockValidatio
38143814
// Check proof of work
38153815
const Consensus::Params& consensusParams = params.GetConsensus();
38163816
const uint32_t nRequiredBits = GetNextWorkRequired(pindexPrev, &block, consensusParams);
3817-
//LogPrintf("%s: block %i - bnTarget = %s, expected bnTarget = %s\n", __func__, nHeight, arith_uint256().SetCompact(block.nBits).ToString(), arith_uint256().SetCompact(nRequiredBits).ToString());
3818-
if (block.nBits != nRequiredBits)
3817+
//LogPrintf("%s: block %i - bnTarget = %s, expected bnTarget = %s\n", __func__, nHeight, arith_uint256().SetCompactBase256(block.nBits).ToString(), arith_uint256().SetCompactBase256(nRequiredBits).ToString());
3818+
if (block.nBits != nRequiredBits) {
38193819
return state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "bad-diffbits", "incorrect difficulty target");
3820+
}
38203821

38213822
// Reject new PoW algorithms until they have been activated
38223823
if (nHeight < 1 && CBlockHeader::GetAlgoType(block.nVersion) > CBlockHeader::AlgoType::ALGO_POW_SHA256)

0 commit comments

Comments
 (0)