| 749 | } |
| 750 | |
| 751 | void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) |
| 752 | { |
| 753 | pblock->vtx.emplace_back(iter->GetTx()); |
| 754 | pblocktemplate->vTxFees.push_back(iter->GetFee()); |
| 755 | pblocktemplate->vTxSigOpsCost.push_back(iter->GetSigOpCost()); |
| 756 | if (fNeedSizeAccounting) { |
| 757 | nBlockSize += ::GetSerializeSize(iter->GetTx(), SER_NETWORK, PROTOCOL_VERSION); |
| 758 | } |
| 759 | nBlockWeight += iter->GetTxWeight(); |
| 760 | ++nBlockTx; |
| 761 | nBlockSigOpsCost += iter->GetSigOpCost(); |
| 762 | nFees += iter->GetFee(); |
| 763 | inBlock.insert(iter); |
| 764 | |
| 765 | bool fPrintPriority = GetBoolArg("-printpriority", DEFAULT_PRINTPRIORITY); |
| 766 | if (fPrintPriority) { |
| 767 | double dPriority = iter->GetPriority(nHeight); |
| 768 | CAmount dummy; |
| 769 | mempool.ApplyDeltas(iter->GetTx().GetHash(), dPriority, dummy); |
| 770 | LogPrintf("priority %.1f fee %s txid %s\n", |
| 771 | dPriority, |
| 772 | CFeeRate(iter->GetModifiedFee(), iter->GetTxSize()).ToString(), |
| 773 | iter->GetTx().GetHash().ToString()); |
| 774 | } |
| 775 | |
| 776 | } |
| 777 | |
| 778 | void BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& alreadyAdded, |
| 779 | indexed_modified_transaction_set &mapModifiedTx) |
nothing calls this directly
no test coverage detected