aboutsummaryrefslogtreecommitdiff
path: root/src/miner.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-10 17:34:17 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-19 17:53:23 -0800
commitb4e4ba475a5679e09f279aaf2a83dcf93c632bdb (patch)
tree31f4d8edd5134e92bf133ee3dfd52651c14ed21e /src/miner.cpp
parent1662b437b33b7ec5a1723f6ae6187d3bdd06f593 (diff)
Introduce convenience type CTransactionRef
Diffstat (limited to 'src/miner.cpp')
-rw-r--r--src/miner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/miner.cpp b/src/miner.cpp
index 2b65cbc65e..c40b12cd8e 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -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);
}