mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
refactor: Remove unused BlockAssembler::pblock member var
This commit is contained in:
parent
1c86ed4148
commit
fa6d5ab674
2 changed files with 2 additions and 4 deletions
|
|
@ -109,7 +109,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
|
||||||
|
|
||||||
if(!pblocktemplate.get())
|
if(!pblocktemplate.get())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
pblock = &pblocktemplate->block; // pointer for convenience
|
CBlock* const pblock = &pblocktemplate->block; // pointer for convenience
|
||||||
|
|
||||||
// Add dummy coinbase tx as first transaction
|
// Add dummy coinbase tx as first transaction
|
||||||
pblock->vtx.emplace_back();
|
pblock->vtx.emplace_back();
|
||||||
|
|
@ -226,7 +226,7 @@ bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& packa
|
||||||
|
|
||||||
void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
|
void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
|
||||||
{
|
{
|
||||||
pblock->vtx.emplace_back(iter->GetSharedTx());
|
pblocktemplate->block.vtx.emplace_back(iter->GetSharedTx());
|
||||||
pblocktemplate->vTxFees.push_back(iter->GetFee());
|
pblocktemplate->vTxFees.push_back(iter->GetFee());
|
||||||
pblocktemplate->vTxSigOpsCost.push_back(iter->GetSigOpCost());
|
pblocktemplate->vTxSigOpsCost.push_back(iter->GetSigOpCost());
|
||||||
nBlockWeight += iter->GetTxWeight();
|
nBlockWeight += iter->GetTxWeight();
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,6 @@ class BlockAssembler
|
||||||
private:
|
private:
|
||||||
// The constructed block template
|
// The constructed block template
|
||||||
std::unique_ptr<CBlockTemplate> pblocktemplate;
|
std::unique_ptr<CBlockTemplate> pblocktemplate;
|
||||||
// A convenience pointer that always refers to the CBlock in pblocktemplate
|
|
||||||
CBlock* pblock;
|
|
||||||
|
|
||||||
// Configuration parameters for the block size
|
// Configuration parameters for the block size
|
||||||
bool fIncludeWitness;
|
bool fIncludeWitness;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue