mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Introduce convenience type CTransactionRef
This commit is contained in:
parent
1662b437b3
commit
b4e4ba475a
16 changed files with 63 additions and 57 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue