Now, it serves as a fail-fast mechanism.
This sentence strikes me as odd; I think it gives the idea that perhaps this check is redundant (but faster to calculate) with the check that involves all descendants, which isn’t the case.
If it were me, I’d add a comment like this to the code:
0The replacement transaction must have a higher feerate than its direct conflicts.
1- The motivation for this check is to ensure that the replacement transaction is preferable
2 for block-inclusion, compared to what would be removed from the mempool.
3- This logic predates ancestor feerate-based transaction selection, which is why it doesn't
4 consider feerates of descendants.
5- Note: Ancestor feerate-based transaction selection has made this comparison insufficient
6 to guarantee that this is incentive-compatible for miners, because it is possible for a
7 descendant transaction of a direct conflict to pay a higher feerate than the transaction
8 that might replace them, under these rules.