MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / AddToBlock

Method AddToBlock

src/node/miner.cpp:271–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void BlockAssembler::AddToBlock(const CTxMemPoolEntry& entry)
272{
273 pblocktemplate->block.vtx.emplace_back(entry.GetSharedTx());
274 pblocktemplate->vTxFees.push_back(entry.GetFee());
275 pblocktemplate->vTxSigOpsCost.push_back(entry.GetSigOpCost());
276 nBlockWeight += entry.GetTxWeight();
277 ++nBlockTx;
278 nBlockSigOpsCost += entry.GetSigOpCost();
279 nFees += entry.GetFee();
280
281 if (*m_options.print_modified_fee) {
282 LogInfo("fee rate %s txid %s\n",
283 CFeeRate(entry.GetModifiedFee(), entry.GetTxSize()).ToString(),
284 entry.GetTx().GetHash().ToString());
285 }
286}
287
288void BlockAssembler::addChunks()
289{

Callers

nothing calls this directly

Calls 12

GetSharedTxMethod · 0.80
GetSigOpCostMethod · 0.80
GetTxWeightMethod · 0.80
GetTxMethod · 0.80
CFeeRateClass · 0.70
emplace_backMethod · 0.45
push_backMethod · 0.45
GetFeeMethod · 0.45
ToStringMethod · 0.45
GetModifiedFeeMethod · 0.45
GetTxSizeMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected