Somewhat surprisingly, RBF rule 3 (absolute fees of replacement transaction must meet or exceed original) is untested.
In other words, applying the following patch:
0diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp
1index e25f5c7c5b..e4f2d9d728 100644
2--- a/src/policy/rbf.cpp
3+++ b/src/policy/rbf.cpp
4@@ -162,14 +162,6 @@ std::optional<std::string> PaysForRBF(CAmount original_fees,
5 CFeeRate relay_fee,
6 const uint256& txid)
7 {
8- // BIP125 Rule [#3](/bitcoin-bitcoin/3/): The replacement fees must be greater than or equal to fees of the
9- // transactions it replaces, otherwise the bandwidth used by those conflicting transactions
10- // would not be paid for.
11- if (replacement_fees < original_fees) {
12- return strprintf("rejecting replacement %s, less fees than conflicting txs; %s < %s",
13- txid.ToString(), FormatMoney(replacement_fees), FormatMoney(original_fees));
14- }
15-
16 // BIP125 Rule [#4](/bitcoin-bitcoin/4/): The new transaction must pay for its own bandwidth. Otherwise, we have a DoS
17 // vector where attackers can cause a transaction to be replaced (and relayed) repeatedly by
18 // increasing the fee by tiny amounts.
then recompiling and running the full test suite causes no failures.
This is sort of a moot point, because the check following the removed check (rule 4 following rule 3) implicitly requires the absolute fee of the replacement to exceed the original. So effectively, you can’t violate rule 3 even if its code is removed.
But still, it seems like we should probably explicitly test for the enforcement of rule 3. This test creates a failure when the above patch is applied.