File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
109
109
110
110
if (!pblocktemplate.get ())
111
111
return nullptr ;
112
- pblock = &pblocktemplate->block ; // pointer for convenience
112
+ CBlock* const pblock = &pblocktemplate->block ; // pointer for convenience
113
113
114
114
// Add dummy coinbase tx as first transaction
115
115
pblock->vtx .emplace_back ();
@@ -226,7 +226,7 @@ bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& packa
226
226
227
227
void BlockAssembler::AddToBlock (CTxMemPool::txiter iter)
228
228
{
229
- pblock-> vtx .emplace_back (iter->GetSharedTx ());
229
+ pblocktemplate-> block . vtx .emplace_back (iter->GetSharedTx ());
230
230
pblocktemplate->vTxFees .push_back (iter->GetFee ());
231
231
pblocktemplate->vTxSigOpsCost .push_back (iter->GetSigOpCost ());
232
232
nBlockWeight += iter->GetTxWeight ();
Original file line number Diff line number Diff line change @@ -128,8 +128,6 @@ class BlockAssembler
128
128
private:
129
129
// The constructed block template
130
130
std::unique_ptr<CBlockTemplate> pblocktemplate;
131
- // A convenience pointer that always refers to the CBlock in pblocktemplate
132
- CBlock* pblock;
133
131
134
132
// Configuration parameters for the block size
135
133
bool fIncludeWitness ;
You can’t perform that action at this time.
0 commit comments