aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorGreg Sanders <gsanders87@gmail.com>2023-09-13 14:20:14 -0400
committerGreg Sanders <gsanders87@gmail.com>2023-09-14 13:32:01 -0400
commit275579d8c133c066212a26423639956e2576e97a (patch)
tree260d90c51d878f75f7319051110509c01ef5ba1b /src/txmempool.cpp
parentf1a9fd627b1a669c4dfab797da42825230708f2a (diff)
downloadbitcoin-275579d8c133c066212a26423639956e2576e97a.tar.xz
Remove MemPoolAccept::m_limits, only have local copies for carveouts
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 92379484e3..bedb57c13c 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -197,7 +197,6 @@ util::Result<CTxMemPool::setEntries> CTxMemPool::CalculateAncestorsAndCheckLimit
}
bool CTxMemPool::CheckPackageLimits(const Package& package,
- const Limits& limits,
std::string &errString) const
{
CTxMemPoolEntry::Parents staged_ancestors;
@@ -208,8 +207,8 @@ bool CTxMemPool::CheckPackageLimits(const Package& package,
std::optional<txiter> piter = GetIter(input.prevout.hash);
if (piter) {
staged_ancestors.insert(**piter);
- if (staged_ancestors.size() + package.size() > static_cast<uint64_t>(limits.ancestor_count)) {
- errString = strprintf("too many unconfirmed parents [limit: %u]", limits.ancestor_count);
+ if (staged_ancestors.size() + package.size() > static_cast<uint64_t>(m_limits.ancestor_count)) {
+ errString = strprintf("too many unconfirmed parents [limit: %u]", m_limits.ancestor_count);
return false;
}
}
@@ -219,7 +218,7 @@ bool CTxMemPool::CheckPackageLimits(const Package& package,
// considered together must be within limits even if they are not interdependent. This may be
// stricter than the limits for each individual transaction.
const auto ancestors{CalculateAncestorsAndCheckLimits(total_size, package.size(),
- staged_ancestors, limits)};
+ staged_ancestors, m_limits)};
// It's possible to overestimate the ancestor/descendant totals.
if (!ancestors.has_value()) errString = "possibly " + util::ErrorString(ancestors).original;
return ancestors.has_value();