Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | LogPrintf("CreateNewBlock(): total size: %u txs: %u fees: %ld sigops %d\n", | ||||
nSerializeSize, nBlockTx, nFees, nBlockSigOps); | nSerializeSize, nBlockTx, nFees, nBlockSigOps); | ||||
// Fill in header. | // Fill in header. | ||||
pblock->hashPrevBlock = pindexPrev->GetBlockHash(); | pblock->hashPrevBlock = pindexPrev->GetBlockHash(); | ||||
UpdateTime(pblock, *config, pindexPrev); | UpdateTime(pblock, *config, pindexPrev); | ||||
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, *config); | pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, *config); | ||||
pblock->nNonce = 0; | pblock->nNonce = 0; | ||||
pblocktemplate->entries[0].txSigOps = GetSigOpCountWithoutP2SH( | pblocktemplate->entries[0].txSigOps = GetSigOpCountWithoutP2SH( | ||||
*pblocktemplate->entries[0].tx, STANDARD_CHECKDATASIG_VERIFY_FLAGS); | *pblocktemplate->entries[0].tx, STANDARD_SCRIPT_VERIFY_FLAGS); | ||||
// Copy all the transactions into the block | // Copy all the transactions into the block | ||||
// FIXME: This should be removed as it is significant overhead. | // FIXME: This should be removed as it is significant overhead. | ||||
// See T479 | // See T479 | ||||
for (const CBlockTemplateEntry &tx : pblocktemplate->entries) { | for (const CBlockTemplateEntry &tx : pblocktemplate->entries) { | ||||
pblock->vtx.push_back(tx.tx); | pblock->vtx.push_back(tx.tx); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |