diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 65997267652..0506f00bb75 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -719,8 +719,7 @@ public: if (!m_node.mempool->CheckPolicyLimits(tx)) { return util::Error{Untranslated("too many unconfirmed transactions in cluster")}; } - LOCK(m_node.mempool->cs); - return m_node.mempool->CheckPackageLimits({tx}, GetVirtualTransactionSize(*tx)); + return {}; } CFeeRate estimateSmartFee(int num_blocks, bool conservative, FeeCalculation* calc) override { diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 99b7d3ef516..921765de732 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -131,12 +131,6 @@ void CTxMemPool::UpdateTransactionsFromBlock(const std::vector& vHashesToU } } -util::Result CTxMemPool::CheckPackageLimits(const Package& package, - const int64_t total_vsize) const -{ - return {}; -} - bool CTxMemPool::HasDescendants(const Txid& txid) const { LOCK(cs); diff --git a/src/txmempool.h b/src/txmempool.h index 437bdf4ebd3..0c0ec241888 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -436,21 +436,6 @@ public: * more transactions as a DoS protection. */ std::vector GatherClusters(const std::vector& txids) const EXCLUSIVE_LOCKS_REQUIRED(cs); - /** Calculate all in-mempool ancestors of a set of transactions not already in the mempool and - * check ancestor and descendant limits. Heuristics are used to estimate the ancestor and - * descendant count of all entries if the package were to be added to the mempool. The limits - * are applied to the union of all package transactions. For example, if the package has 3 - * transactions and limits.ancestor_count = 25, the union of all 3 sets of ancestors (including the - * transactions themselves) must be <= 22. - * @param[in] package Transaction package being evaluated for acceptance - * to mempool. The transactions need not be direct - * ancestors/descendants of each other. - * @param[in] total_vsize Sum of virtual sizes for all transactions in package. - * @returns {} or the error reason if a limit is hit. - */ - util::Result CheckPackageLimits(const Package& package, - int64_t total_vsize) const EXCLUSIVE_LOCKS_REQUIRED(cs); - /** Populate setDescendants with all in-mempool descendants of given transaction. * Assumes that setDescendants includes all in-mempool descendants of anything * already in it. */ diff --git a/src/validation.cpp b/src/validation.cpp index 62b629d4b86..b2ea91e29d1 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1054,17 +1054,11 @@ bool MemPoolAccept::PackageMempoolChecks(const std::vector& txn AssertLockHeld(cs_main); AssertLockHeld(m_pool.cs); - // CheckPackageLimits expects the package transactions to not already be in the mempool. - assert(std::all_of(txns.cbegin(), txns.cend(), [this](const auto& tx) { return !m_pool.exists(tx->GetHash()); })); + assert(std::all_of(txns.cbegin(), txns.cend(), [this](const auto& tx) + { return !m_pool.exists(tx->GetHash());})); assert(txns.size() == workspaces.size()); - auto result = m_pool.CheckPackageLimits(txns, total_vsize); - if (!result) { - // This is a package-wide error, separate from an individual transaction error. - return package_state.Invalid(PackageValidationResult::PCKG_POLICY, "package-mempool-limits", util::ErrorString(result).original); - } - // No conflicts means we're finished. Further checks are all RBF-only. if (!m_subpackage.m_rbf) return true;