Skip to content

Commit 5d281e7

Browse files
committed
ContextualCheckBlockHeader: dynafed doesn't call CheckChallenge
1 parent 9fe43cd commit 5d281e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,9 +3503,9 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationSta
35033503
assert(pindexPrev != nullptr);
35043504
const int nHeight = pindexPrev->nHeight + 1;
35053505

3506-
// Check proof of work if necessary
3506+
// Check proof of work target or non-dynamic signblockscript if necessary
35073507
const Consensus::Params& consensusParams = params.GetConsensus();
3508-
if (!CheckChallenge(block, *pindexPrev, consensusParams))
3508+
if (!IsDynaFedEnabled(pindexPrev, consensusParams) && !CheckChallenge(block, *pindexPrev, consensusParams))
35093509
return state.DoS(100, false, REJECT_INVALID, "bad-diffbits", false, "incorrect proof of work");
35103510

35113511
// Check against checkpoints

0 commit comments

Comments
 (0)