Prioritize transaction with low fee [regtest] Tx1:
send '{&quot;bcrt1qgz8qhrqyglh7zu3alssydsfa7wk2auucftfnv3&quot;: 0.2}' null &quot;unset&quot; 1.1

{
  &quot;txid&quot;: &quot;d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8&quot;,
  &quot;complete&quot;: true
}

Bump fee:
bumpfee d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8

Tx2:
{
  &quot;txid&quot;: &quot;14f13ad9e757752fce52be3f60a08ff697db646863e68f43e76bd1e70eb4504f&quot;,
  &quot;origfee&quot;: 0.00000228,
  &quot;fee&quot;: 0.00001268,
  &quot;errors&quot;: [
  ]
}

Prioritize Tx1:
prioritisetransaction &quot;d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8&quot; 0.0 2536

true

Mine a block:
generatetoaddress 1 &quot;bcrt1qh3v7u6qv46q26srjtjux3cg2g35qlyjf8fqgej&quot;

[
  &quot;7901e58c61d7e4ed0a07aaef382b5ca6c2f3ec146ed093f443c5e322d4ba3848&quot;
]

Why does Tx2 get included in the block even though I tried to prioritize Tx1:
getblock &quot;7901e58c61d7e4ed0a07aaef382b5ca6c2f3ec146ed093f443c5e322d4ba3848&quot; 2

https://pastebin.com/raw/kYfTsUUG
If this is related to mempool conflicts and the way they are managed in Bitcoin Core, how can I test below scenario using regtest:

User broadcasts Tx1 which is relayed and now in the mempool of a node used by mining pools.
User replaces it using RBF with Tx2, this transaction is not yet relayed to mempool of nodes used by mining pools.
Next block is mined and Tx1 is included in the block
The issue got resolved. I had to prioritize the transaction before bumping fee, so the correct order of things mentioned in question will be:

Tx1

Prioritize Tx1

Bump fee

Tx2

Mine a block


Reason: Maybe we can't prioritize a transaction that is already replaced with a new transaction. I think prioritisetransaction should have returned some error or at least false in this case. However, I noticed it returns true for almost any transaction id. I copied a transaction id from testnet explorer and even that returns true when I use it with prioritisetransaction on regtest.