Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show All 36 Lines | struct CBlockTemplate { | ||||
CBlock block; | CBlock block; | ||||
std::vector<CBlockTemplateEntry> entries; | std::vector<CBlockTemplateEntry> entries; | ||||
}; | }; | ||||
// Container for tracking updates to ancestor feerate as we include (parent) | // Container for tracking updates to ancestor feerate as we include (parent) | ||||
// transactions in a block | // transactions in a block | ||||
struct CTxMemPoolModifiedEntry { | struct CTxMemPoolModifiedEntry { | ||||
CTxMemPoolModifiedEntry(CTxMemPool::txiter entry) { | explicit CTxMemPoolModifiedEntry(CTxMemPool::txiter entry) { | ||||
iter = entry; | iter = entry; | ||||
nSizeWithAncestors = entry->GetSizeWithAncestors(); | nSizeWithAncestors = entry->GetSizeWithAncestors(); | ||||
nBillableSizeWithAncestors = entry->GetBillableSizeWithAncestors(); | nBillableSizeWithAncestors = entry->GetBillableSizeWithAncestors(); | ||||
nModFeesWithAncestors = entry->GetModFeesWithAncestors(); | nModFeesWithAncestors = entry->GetModFeesWithAncestors(); | ||||
nSigOpCountWithAncestors = entry->GetSigOpCountWithAncestors(); | nSigOpCountWithAncestors = entry->GetSigOpCountWithAncestors(); | ||||
} | } | ||||
CTxMemPool::txiter iter; | CTxMemPool::txiter iter; | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | typedef boost::multi_index_container< | ||||
indexed_modified_transaction_set; | indexed_modified_transaction_set; | ||||
typedef indexed_modified_transaction_set::nth_index<0>::type::iterator | typedef indexed_modified_transaction_set::nth_index<0>::type::iterator | ||||
modtxiter; | modtxiter; | ||||
typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator | typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator | ||||
modtxscoreiter; | modtxscoreiter; | ||||
struct update_for_parent_inclusion { | struct update_for_parent_inclusion { | ||||
update_for_parent_inclusion(CTxMemPool::txiter it) : iter(it) {} | explicit update_for_parent_inclusion(CTxMemPool::txiter it) : iter(it) {} | ||||
void operator()(CTxMemPoolModifiedEntry &e) { | void operator()(CTxMemPoolModifiedEntry &e) { | ||||
e.nModFeesWithAncestors -= iter->GetFee(); | e.nModFeesWithAncestors -= iter->GetFee(); | ||||
e.nSizeWithAncestors -= iter->GetTxSize(); | e.nSizeWithAncestors -= iter->GetTxSize(); | ||||
e.nBillableSizeWithAncestors -= iter->GetTxBillableSize(); | e.nBillableSizeWithAncestors -= iter->GetTxBillableSize(); | ||||
e.nSigOpCountWithAncestors -= iter->GetSigOpCount(); | e.nSigOpCountWithAncestors -= iter->GetSigOpCount(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |