diff --git a/src/miner.cpp b/src/miner.cpp index 384a60f40..d118b3da1 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -422,6 +422,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) txNew.vout.resize(1); txNew.vout[0].scriptPubKey = scriptPubKeyIn; txNew.vout[0].nValue = GetBlockSubsidy(nHeight,chainparams.GetConsensus()); + txNew.nLockTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime()); txNew.nExpiryHeight = 0; // Add fees txNew.vout[0].nValue += nFees;