Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show All 30 Lines | |||||
}; | }; | ||||
// 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) { | CTxMemPoolModifiedEntry(CTxMemPool::txiter entry) { | ||||
iter = entry; | iter = entry; | ||||
nSizeWithAncestors = entry->GetSizeWithAncestors(); | nSizeWithAncestors = entry->GetSizeWithAncestors(); | ||||
nBillableSizeWithAncestors = entry->GetBillableSizeWithAncestors(); | |||||
nModFeesWithAncestors = entry->GetModFeesWithAncestors(); | nModFeesWithAncestors = entry->GetModFeesWithAncestors(); | ||||
nSigOpCountWithAncestors = entry->GetSigOpCountWithAncestors(); | nSigOpCountWithAncestors = entry->GetSigOpCountWithAncestors(); | ||||
} | } | ||||
CTxMemPool::txiter iter; | CTxMemPool::txiter iter; | ||||
uint64_t nSizeWithAncestors; | uint64_t nSizeWithAncestors; | ||||
uint64_t nBillableSizeWithAncestors; | |||||
Amount nModFeesWithAncestors; | Amount nModFeesWithAncestors; | ||||
int64_t nSigOpCountWithAncestors; | int64_t nSigOpCountWithAncestors; | ||||
}; | }; | ||||
/** | /** | ||||
* Comparator for CTxMemPool::txiter objects. | * Comparator for CTxMemPool::txiter objects. | ||||
* It simply compares the internal memory address of the CTxMemPoolEntry object | * It simply compares the internal memory address of the CTxMemPoolEntry object | ||||
* pointed to. This means it has no meaning, and is only useful for using them | * pointed to. This means it has no meaning, and is only useful for using them | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | 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) {} | 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.nSigOpCountWithAncestors -= iter->GetSigOpCount(); | e.nSigOpCountWithAncestors -= iter->GetSigOpCount(); | ||||
} | } | ||||
CTxMemPool::txiter iter; | CTxMemPool::txiter iter; | ||||
}; | }; | ||||
/** Generate a new block, without valid proof-of-work */ | /** Generate a new block, without valid proof-of-work */ | ||||
class BlockAssembler { | class BlockAssembler { | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |