diff options
Diffstat (limited to 'src/util/feefrac.cpp')
-rw-r--r-- | src/util/feefrac.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/feefrac.cpp b/src/util/feefrac.cpp index a271fe585e..68fb836936 100644 --- a/src/util/feefrac.cpp +++ b/src/util/feefrac.cpp @@ -53,7 +53,6 @@ std::partial_ordering CompareFeerateDiagram(Span<const FeeFrac> dia0, Span<const const FeeFrac& point_p = next_point(unproc_side); const FeeFrac& point_a = prev_point(!unproc_side); - // Slope of AP can be negative, unlike AB const auto slope_ap = point_p - point_a; Assume(slope_ap.size > 0); std::weak_ordering cmp = std::weak_ordering::equivalent; @@ -77,10 +76,12 @@ std::partial_ordering CompareFeerateDiagram(Span<const FeeFrac> dia0, Span<const if (std::is_gt(cmp)) better_somewhere[unproc_side] = true; if (std::is_lt(cmp)) better_somewhere[!unproc_side] = true; ++next_index[unproc_side]; + + // If both diagrams are better somewhere, they are incomparable. + if (better_somewhere[0] && better_somewhere[1]) return std::partial_ordering::unordered; + } while(true); - // If both diagrams are better somewhere, they are incomparable. - if (better_somewhere[0] && better_somewhere[1]) return std::partial_ordering::unordered; // Otherwise compare the better_somewhere values. return better_somewhere[0] <=> better_somewhere[1]; } |