doc: fix incorrect description of PackageMempoolChecks
- We no longer enforce ancestor/descendant count limit in both PreChecks and PackageMempoolChecks. - This commit fixes the incorrect comment by just renaming `PackageMempoolChecks` to `PackageRBFChecks` - The method name is self explanatory now; hence no need for a description comment.
This commit is contained in:
1 file changed
+10
-12
+10
-12
@@ -672,12 +672,10 @@ private:
|
|||||||
// Run checks for mempool replace-by-fee, only used in AcceptSingleTransaction.
|
// Run checks for mempool replace-by-fee, only used in AcceptSingleTransaction.
|
||||||
bool ReplacementChecks(Workspace& ws) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs);
|
bool ReplacementChecks(Workspace& ws) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs);
|
||||||
|
|
||||||
// Enforce package mempool ancestor/descendant limits (distinct from individual
|
bool PackageRBFChecks(const std::vector<CTransactionRef>& txns,
|
||||||
// ancestor/descendant limits done in PreChecks) and run Package RBF checks.
|
std::vector<Workspace>& workspaces,
|
||||||
bool PackageMempoolChecks(const std::vector<CTransactionRef>& txns,
|
int64_t total_vsize,
|
||||||
std::vector<Workspace>& workspaces,
|
PackageValidationState& package_state) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs);
|
||||||
int64_t total_vsize,
|
|
||||||
PackageValidationState& package_state) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs);
|
|
||||||
|
|
||||||
// Run the script checks using our policy flags. As this can be slow, we should
|
// Run the script checks using our policy flags. As this can be slow, we should
|
||||||
// only invoke this on transactions that have otherwise passed policy checks.
|
// only invoke this on transactions that have otherwise passed policy checks.
|
||||||
@@ -1035,10 +1033,10 @@ bool MemPoolAccept::ReplacementChecks(Workspace& ws)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MemPoolAccept::PackageMempoolChecks(const std::vector<CTransactionRef>& txns,
|
bool MemPoolAccept::PackageRBFChecks(const std::vector<CTransactionRef>& txns,
|
||||||
std::vector<Workspace>& workspaces,
|
std::vector<Workspace>& workspaces,
|
||||||
const int64_t total_vsize,
|
const int64_t total_vsize,
|
||||||
PackageValidationState& package_state)
|
PackageValidationState& package_state)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_main);
|
AssertLockHeld(cs_main);
|
||||||
AssertLockHeld(m_pool.cs);
|
AssertLockHeld(m_pool.cs);
|
||||||
@@ -1470,7 +1468,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactionsInternal(con
|
|||||||
// needed by another transaction in the package. We also need to make sure that no package
|
// needed by another transaction in the package. We also need to make sure that no package
|
||||||
// tx replaces (or replaces the ancestor of) the parent of another package tx. As long as we
|
// tx replaces (or replaces the ancestor of) the parent of another package tx. As long as we
|
||||||
// check these two things, we don't need to track the coins spent.
|
// check these two things, we don't need to track the coins spent.
|
||||||
// If a package tx conflicts with a mempool tx, PackageMempoolChecks() ensures later that any package RBF attempt
|
// If a package tx conflicts with a mempool tx, PackageRBFChecks() ensures later that any package RBF attempt
|
||||||
// has *no* in-mempool ancestors, so we don't have to worry about subsequent transactions in
|
// has *no* in-mempool ancestors, so we don't have to worry about subsequent transactions in
|
||||||
// same package spending the same in-mempool outpoints. This needs to be revisited for general
|
// same package spending the same in-mempool outpoints. This needs to be revisited for general
|
||||||
// package RBF.
|
// package RBF.
|
||||||
@@ -1513,7 +1511,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactionsInternal(con
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply package mempool RBF checks.
|
// Apply package mempool RBF checks.
|
||||||
if (m_subpackage.m_rbf && !PackageMempoolChecks(txns, workspaces, m_subpackage.m_total_vsize, package_state)) {
|
if (m_subpackage.m_rbf && !PackageRBFChecks(txns, workspaces, m_subpackage.m_total_vsize, package_state)) {
|
||||||
return PackageMempoolAcceptResult(package_state, std::move(results));
|
return PackageMempoolAcceptResult(package_state, std::move(results));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user