Move CalculateChunksForRBF() to the mempool changeset

This commit is contained in:
Suhas Daftuar
2024-10-16 09:09:44 -04:00
parent 284a1d33f1
commit d7dc9fd2f7
7 changed files with 147 additions and 73 deletions

View File

@@ -1207,7 +1207,7 @@ bool MemPoolAccept::PackageMempoolChecks(const std::vector<CTransactionRef>& txn
// Check if it's economically rational to mine this package rather than the ones it replaces.
// This takes the place of ReplacementChecks()'s PaysMoreThanConflicts() in the package RBF setting.
if (const auto err_tup{ImprovesFeerateDiagram(m_pool, direct_conflict_iters, m_subpackage.m_all_conflicts, m_subpackage.m_total_modified_fees, m_subpackage.m_total_vsize)}) {
if (const auto err_tup{ImprovesFeerateDiagram(*m_subpackage.m_changeset)}) {
return package_state.Invalid(PackageValidationResult::PCKG_POLICY,
"package RBF failed: " + err_tup.value().second, "");
}