Skip to content

Commit d9391ec

Browse files
committed
CalculateFeerateDiagramsForRBF: remove size tie-breaking from chunking conflicts
1 parent b684d82 commit d9391ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/rbf_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
520520
BOOST_CHECK(replace_multiple_clusters->second.size() == 2);
521521
}
522522

523-
// Add a child transaction to conflict_1 and make it cluster size 2, still one chunk due to same feerate
523+
// Add a child transaction to conflict_1 and make it cluster size 2, two chunks due to same feerate
524524
const auto conflict_1_child = make_tx(/*inputs=*/{conflict_1}, /*output_values=*/ {995 * CENT});
525525
pool.addUnchecked(entry.Fee(low_fee).FromTx(conflict_1_child));
526526
const auto conflict_1_child_entry = pool.GetIter(conflict_1_child->GetHash()).value();
@@ -529,7 +529,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
529529
const auto replace_multiple_clusters_2{pool.CalculateFeerateDiagramsForRBF(/*replacement_fees=*/high_fee, /*replacement_vsize=*/low_size, {conflict_1_entry, conflict_2_entry, conflict_3_entry}, {conflict_1_entry, conflict_2_entry, conflict_3_entry, conflict_1_child_entry})};
530530

531531
BOOST_CHECK(replace_multiple_clusters_2.has_value());
532-
BOOST_CHECK(replace_multiple_clusters_2->first.size() == 4);
532+
BOOST_CHECK(replace_multiple_clusters_2->first.size() == 5);
533533
BOOST_CHECK(replace_multiple_clusters_2->second.size() == 2);
534534
}
535535

src/txmempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ util::Result<std::pair<std::vector<FeeFrac>, std::vector<FeeFrac>>> CTxMemPool::
13171317
// We'll add chunks for either the ancestor by itself and this tx
13181318
// by itself, or for a combined package.
13191319
FeeFrac package{txiter->GetModFeesWithAncestors(), static_cast<int32_t>(txiter->GetSizeWithAncestors())};
1320-
if (individual > package) {
1320+
if (individual >> package) {
13211321
// The individual feerate is higher than the package, and
13221322
// therefore higher than the parent's fee. Chunk these
13231323
// together.

0 commit comments

Comments
 (0)