mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Introduce convenience type CTransactionRef
This commit is contained in:
@@ -178,7 +178,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
||||
coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn;
|
||||
coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
|
||||
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
|
||||
pblock->vtx[0] = std::make_shared<const CTransaction>(std::move(coinbaseTx));
|
||||
pblock->vtx[0] = MakeTransactionRef(std::move(coinbaseTx));
|
||||
pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());
|
||||
pblocktemplate->vTxFees[0] = -nFees;
|
||||
|
||||
@@ -605,6 +605,6 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned
|
||||
txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
|
||||
assert(txCoinbase.vin[0].scriptSig.size() <= 100);
|
||||
|
||||
pblock->vtx[0] = std::make_shared<const CTransaction>(std::move(txCoinbase));
|
||||
pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
|
||||
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user