Revert "Set nLockTime in CreateNewBlock() so coinbase txs do not have the same txid."
This reverts commit 29306269f4.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user