aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2024-03-17 09:42:12 -0400
committerPieter Wuille <pieter@wuille.net>2024-04-22 09:36:36 -0400
commitb22901dfa9cc3af94bf13163a28300eb1ab25b22 (patch)
tree9227531a651b5a29fc2ef395f9da6c4ae6d21414 /src/policy
parentba7c67f609a3d9a6da194d4abb7f8a60934907c3 (diff)
Avoid explicitly computing diagram; compare based on chunks
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/rbf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp
index 84c3352b9d..2ad79b6f99 100644
--- a/src/policy/rbf.cpp
+++ b/src/policy/rbf.cpp
@@ -191,13 +191,13 @@ std::optional<std::pair<DiagramCheckError, std::string>> ImprovesFeerateDiagram(
int64_t replacement_vsize)
{
// Require that the replacement strictly improves the mempool's feerate diagram.
- const auto diagram_results{pool.CalculateFeerateDiagramsForRBF(replacement_fees, replacement_vsize, direct_conflicts, all_conflicts)};
+ const auto chunk_results{pool.CalculateChunksForRBF(replacement_fees, replacement_vsize, direct_conflicts, all_conflicts)};
- if (!diagram_results.has_value()) {
- return std::make_pair(DiagramCheckError::UNCALCULABLE, util::ErrorString(diagram_results).original);
+ if (!chunk_results.has_value()) {
+ return std::make_pair(DiagramCheckError::UNCALCULABLE, util::ErrorString(chunk_results).original);
}
- if (!std::is_gt(CompareFeerateDiagram(diagram_results.value().second, diagram_results.value().first))) {
+ if (!std::is_gt(CompareChunks(chunk_results.value().second, chunk_results.value().first))) {
return std::make_pair(DiagramCheckError::FAILURE, "insufficient feerate: does not improve feerate diagram");
}
return std::nullopt;