Container for tracking updates to ancestor feerate as we include (parent) transactions in a block
| 37 | // Container for tracking updates to ancestor feerate as we include (parent) |
| 38 | // transactions in a block |
| 39 | struct CTxMemPoolModifiedEntry { |
| 40 | explicit CTxMemPoolModifiedEntry(CTxMemPool::txiter entry) |
| 41 | { |
| 42 | iter = entry; |
| 43 | nSizeWithAncestors = entry->GetSizeWithAncestors(); |
| 44 | discountSizeWithAncestors = entry->GetDiscountSizeWithAncestors(); |
| 45 | nModFeesWithAncestors = entry->GetModFeesWithAncestors(); |
| 46 | nSigOpCostWithAncestors = entry->GetSigOpCostWithAncestors(); |
| 47 | } |
| 48 | |
| 49 | CAmount GetModifiedFee() const { return iter->GetModifiedFee(); } |
| 50 | uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; } |
| 51 | uint64_t GetDiscountSizeWithAncestors() const { return discountSizeWithAncestors; } |
| 52 | CAmount GetModFeesWithAncestors() const { return nModFeesWithAncestors; } |
| 53 | size_t GetTxSize() const { return iter->GetTxSize(); } |
| 54 | size_t GetDiscountTxSize() const { return iter->GetDiscountTxSize(); } |
| 55 | const CTransaction& GetTx() const { return iter->GetTx(); } |
| 56 | |
| 57 | CTxMemPool::txiter iter; |
| 58 | uint64_t nSizeWithAncestors; |
| 59 | uint64_t discountSizeWithAncestors; |
| 60 | CAmount nModFeesWithAncestors; |
| 61 | int64_t nSigOpCostWithAncestors; |
| 62 | }; |
| 63 | |
| 64 | /** Comparator for CTxMemPool::txiter objects. |
| 65 | * It simply compares the internal memory address of the CTxMemPoolEntry object |