@@ -634,6 +634,7 @@ class MemPoolAccept
634
634
// Enforce package mempool ancestor/descendant limits (distinct from individual
635
635
// ancestor/descendant limits done in PreChecks).
636
636
bool PackageMempoolChecks (const std::vector<CTransactionRef>& txns,
637
+ int64_t total_vsize,
637
638
PackageValidationState& package_state) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs);
638
639
639
640
// Run the script checks using our policy flags. As this can be slow, we should
@@ -1003,6 +1004,7 @@ bool MemPoolAccept::ReplacementChecks(Workspace& ws)
1003
1004
}
1004
1005
1005
1006
bool MemPoolAccept::PackageMempoolChecks (const std::vector<CTransactionRef>& txns,
1007
+ const int64_t total_vsize,
1006
1008
PackageValidationState& package_state)
1007
1009
{
1008
1010
AssertLockHeld (cs_main);
@@ -1013,7 +1015,7 @@ bool MemPoolAccept::PackageMempoolChecks(const std::vector<CTransactionRef>& txn
1013
1015
{ return !m_pool.exists (GenTxid::Txid (tx->GetHash ()));}));
1014
1016
1015
1017
std::string err_string;
1016
- if (!m_pool.CheckPackageLimits (txns, err_string)) {
1018
+ if (!m_pool.CheckPackageLimits (txns, total_vsize, err_string)) {
1017
1019
// This is a package-wide error, separate from an individual transaction error.
1018
1020
return package_state.Invalid (PackageValidationResult::PCKG_POLICY, " package-mempool-limits" , err_string);
1019
1021
}
@@ -1298,7 +1300,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
1298
1300
// because it's unnecessary. Also, CPFP carve out can increase the limit for individual
1299
1301
// transactions, but this exemption is not extended to packages in CheckPackageLimits().
1300
1302
std::string err_string;
1301
- if (txns.size () > 1 && !PackageMempoolChecks (txns, package_state)) {
1303
+ if (txns.size () > 1 && !PackageMempoolChecks (txns, m_total_vsize, package_state)) {
1302
1304
return PackageMempoolAcceptResult (package_state, std::move (results));
1303
1305
}
1304
1306
0 commit comments