Revert "Set nLockTime in CreateNewBlock() so coinbase txs do not have the same txid."

This reverts commit 29306269f4.
This commit is contained in:
Simon
2016-07-27 00:41:26 -07:00
parent 07e6d5b025
commit 2481bab2b8
2 changed files with 109 additions and 114 deletions

View File

@@ -335,11 +335,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
txNew.vout[0].scriptPubKey = scriptPubKeyIn;
txNew.vout[0].nValue = GetBlockSubsidy(nHeight, chainparams.GetConsensus());
// If nLockTime is 0, coinbase txs with the same inputs and outputs may have the same non-malleable txid.
// So we set nLockTime to the previous block height to ensure this coinbase tx will be accepted into
// the next block. This replicates the behaviour of having nLockTime of 0.
txNew.nLockTime = pindexPrev->nHeight;
if ((nHeight > 0) && (nHeight < chainparams.GetConsensus().nSubsidyHalvingInterval)) {
// Founders reward is 20% of the block subsidy
auto vFoundersReward = txNew.vout[0].nValue / 5;