Skip to content

Commit 88705a6

Browse files
committed
[Consensus] Guard time checks changes
Guard these changes against the protocol version change enforcement
1 parent 105ee5f commit 88705a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kernel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ bool CheckProofOfStake(const CBlock block, uint256& hashProofOfStake, std::uniqu
431431

432432
unsigned int nBlockFromTime = blockfrom.nTime;
433433
unsigned int nTxTime = block.nTime;
434-
if (!txin.IsZerocoinSpend()) { //Equivalent for zPIV is checked above in ContextualCheckZerocoinStake()
434+
if (!txin.IsZerocoinSpend() && nPreviousBlockHeight >= Params().Zerocoin_Block_Public_Spend_Enabled() - 1) { //Equivalent for zPIV is checked above in ContextualCheckZerocoinStake()
435435
if (nTxTime < nBlockFromTime) // Transaction timestamp nTxTime
436436
return error("CheckStakeKernelHash() : nTime violation - nBlockFromTime=%d nTimeTx=%d", nBlockFromTime, nTxTime);
437437
if (nBlockFromTime + nStakeMinAge > nTxTime) // Min age requirement

0 commit comments

Comments
 (0)