Skip to content

Commit

Permalink
Merge pull request #94 from BlockMechanic/segwit
Browse files Browse the repository at this point in the history
Update miner.cpp
  • Loading branch information
BlockMechanic authored Aug 11, 2022
2 parents 4457efa + 6c088b0 commit 3421fb7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,23 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
pblock->vtx.emplace_back();
pblock->vtx[1] = MakeTransactionRef(std::move(txCoinStake));
}

LogPrintf("%s: vtx size %d\n",__func__, pblock->vtx.size());

if(fProofOfStake && pblock->vtx.size() > 2)
pblock->vtx.pop_back();

for (auto a: pblock->vtx)
LogPrintf("%s\n", a->ToString());

try {
for (auto a: pblock->vtx)
LogPrintf("%s\n", a->ToString());
}
catch (const std::exception& e) {
return error("%s: %s", __func__, e.what());
}

pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());
pblocktemplate->vTxFees[0] = -nFees;

LogPrintf("CreateNewBlock(): block weight: %u txs: %u fees: %ld sigops %d\n", GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost);

// Fill in header
Expand Down

0 comments on commit 3421fb7

Please sign in to comment.