miner: Set coinbase expiry height to block height from NU5 activation
This commit is contained in:
parent
0a78f4c6ec
commit
e18da34468
|
@ -293,8 +293,14 @@ CMutableTransaction CreateCoinbaseTransaction(const CChainParams& chainparams, C
|
|||
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(chainparams.GetConsensus(), nHeight);
|
||||
mtx.vin.resize(1);
|
||||
mtx.vin[0].prevout.SetNull();
|
||||
if (chainparams.GetConsensus().NetworkUpgradeActive(nHeight, Consensus::UPGRADE_NU5)) {
|
||||
// ZIP 203: From NU5 onwards, nExpiryHeight is set to the block height in
|
||||
// coinbase transactions.
|
||||
mtx.nExpiryHeight = nHeight;
|
||||
} else {
|
||||
// Set to 0 so expiry height does not apply to coinbase txs
|
||||
mtx.nExpiryHeight = 0;
|
||||
}
|
||||
|
||||
// Add outputs and sign
|
||||
std::visit(
|
||||
|
|
Loading…
Reference in New Issue