-snip-
I tried replicating the scenario that you described. This isn't anything scientific but should provide a clue into the behavior of reference client. Miners should have a different behavior given that they are probably not running the reference implementation.
Here's my first transaction:
Output A to Address B.
91ed8bad00c62dfdde7068da6c3216fa2af51e0d3c994ac683cf03069ceea1b6
{
"fees": {
"base": 0.00000550,
"modified": 0.00000550,
"ancestor": 0.00000550,
"descendant": 0.00000550
},
"vsize": 110,
"weight": 437,
"fee": 0.00000550,
"modifiedfee": 0.00000550,
"time": 1615027325,
"height": 673402,
"descendantcount": 1,
"descendantsize": 110,
"descendantfees": 550,
"ancestorcount": 1,
"ancestorsize": 110,
"ancestorfees": 550,
"wtxid": "5ea4da4c370d67bfcaf0d7a3591b56cb7b4240a4cbfd72a404c5078d606d443e",
"depends": [
],
"spentby": [
],
"bip125-replaceable": true,
"unbroadcast": false
}
My node sees it in the mempool.
After which, I replaced it with another transaction.
Output A + Output C to Address B.
The first transaction is purged from my node's mempool. The second transaction is now available.
{ "fees": {
"base": 0.00001246,
"modified": 0.00001246,
"ancestor": 0.00001246,
"descendant": 0.00001246
},
"vsize": 177,
"weight": 708,
"fee": 0.00001246,
"modifiedfee": 0.00001246,
"time": 1615028442,
"height": 673405,
"descendantcount": 1,
"descendantsize": 177,
"descendantfees": 1246,
"ancestorcount": 1,
"ancestorsize": 177,
"ancestorfees": 1246,
"wtxid": "cd4f4135cd73e4ac9a8059feef951dd8948544c826f933ee5423b1453c5559c4",
"depends": [
],
"spentby": [
],
"bip125-replaceable": true,
"unbroadcast": false
}
Afterwhich, I broadcasted the third transaction. With output C only to Address B.
8724f830d928064a095107c99dc84f57ec5df22477d075d4d1539f7e028212ad
{
"fees": {
"base": 0.00001430,
"modified": 0.00001430,
"ancestor": 0.00001430,
"descendant": 0.00001430
},
"vsize": 110,
"weight": 437,
"fee": 0.00001430,
"modifiedfee": 0.00001430,
"time": 1615028761,
"height": 673405,
"descendantcount": 1,
"descendantsize": 110,
"descendantfees": 1430,
"ancestorcount": 1,
"ancestorsize": 110,
"ancestorfees": 1430,
"wtxid": "22ba16de06447cc25b8211a99c39c1b247cb17410378c3814578f300beada316",
"depends": [
],
"spentby": [
],
"bip125-replaceable": true,
"unbroadcast": false
}
The previous two transactions were both evicted from the mempool. Results appears to be consistent across both of my nodes.
Transactions that are evicted from the mempool but are still otherwise valid appears to be excluded from a reference node's mempool after it gets replaced.