diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -167,13 +167,6 @@ size_t DynamicMemoryUsage() const { return nUsageSize; } const LockPoints &GetLockPoints() const { return lockPoints; } - // Adjusts the descendant state. -- To be removed after Wellington - void UpdateDescendantState(int64_t modifySize, Amount modifyFee, - int64_t modifyCount, int64_t modifySigChecks); - // Adjusts the ancestor state -- To be removed after Wellington - void UpdateAncestorState(int64_t modifySize, Amount modifyFee, - int64_t modifyCount, int64_t modifySigChecks); - // Updates the fee delta used for mining priority score, and the // modified fees with descendants. void UpdateFeeDelta(Amount feeDelta); diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -29,44 +29,6 @@ #include #include -// Helpers for modifying CTxMemPool::mapTx, which is a boost multi_index. -// Remove after Wellington -struct update_descendant_state { - update_descendant_state(int64_t _modifySize, Amount _modifyFee, - int64_t _modifyCount, int64_t _modifySigChecks) - : modifySize(_modifySize), modifyFee(_modifyFee), - modifyCount(_modifyCount), modifySigChecks(_modifySigChecks) {} - - void operator()(CTxMemPoolEntry &e) { - e.UpdateDescendantState(modifySize, modifyFee, modifyCount, - modifySigChecks); - } - -private: - int64_t modifySize; - Amount modifyFee; - int64_t modifyCount; - int64_t modifySigChecks; -}; - -struct update_ancestor_state { - update_ancestor_state(int64_t _modifySize, Amount _modifyFee, - int64_t _modifyCount, int64_t _modifySigChecks) - : modifySize(_modifySize), modifyFee(_modifyFee), - modifyCount(_modifyCount), modifySigChecks(_modifySigChecks) {} - - void operator()(CTxMemPoolEntry &e) { - e.UpdateAncestorState(modifySize, modifyFee, modifyCount, - modifySigChecks); - } - -private: - int64_t modifySize; - Amount modifyFee; - int64_t modifyCount; - int64_t modifySigChecks; -}; - bool TestLockPointValidity(const CChain &active_chain, const LockPoints &lp) { AssertLockHeld(cs_main); // If there are relative lock times then the maxInputBlock will be set @@ -210,31 +172,6 @@ } } -void CTxMemPoolEntry::UpdateDescendantState(int64_t modifySize, - Amount modifyFee, - int64_t modifyCount, - int64_t modifySigChecks) { - nSizeWithDescendants += modifySize; - assert(int64_t(nSizeWithDescendants) > 0); - nModFeesWithDescendants += modifyFee; - nCountWithDescendants += modifyCount; - assert(int64_t(nCountWithDescendants) > 0); - nSigChecksWithDescendants += modifySigChecks; - assert(nSigChecksWithDescendants >= 0); -} - -void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, Amount modifyFee, - int64_t modifyCount, - int64_t modifySigChecks) { - nSizeWithAncestors += modifySize; - assert(int64_t(nSizeWithAncestors) > 0); - nModFeesWithAncestors += modifyFee; - nCountWithAncestors += modifyCount; - assert(int64_t(nCountWithAncestors) > 0); - nSigChecksWithAncestors += modifySigChecks; - assert(nSigChecksWithAncestors >= 0); -} - CTxMemPool::CTxMemPool(int check_ratio) : m_check_ratio(check_ratio) { // lock free clear _clear();