0

Tx1:

send '{"bcrt1qgz8qhrqyglh7zu3alssydsfa7wk2auucftfnv3": 0.2}' null "unset" 1.1
{
  "txid": "d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8",
  "complete": true
}

Bump fee:

bumpfee d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8

Tx2:

{
  "txid": "14f13ad9e757752fce52be3f60a08ff697db646863e68f43e76bd1e70eb4504f",
  "origfee": 0.00000228,
  "fee": 0.00001268,
  "errors": [
  ]
}

Prioritize Tx1:

prioritisetransaction "d040ebe603f80bdf1a92877efeb2b4a27c32766202aeecf3a969b665a0d4c6d8" 0.0 2536
true

Mine a block:

generatetoaddress 1 "bcrt1qh3v7u6qv46q26srjtjux3cg2g35qlyjf8fqgej"
[
  "7901e58c61d7e4ed0a07aaef382b5ca6c2f3ec146ed093f443c5e322d4ba3848"
]

Why does Tx2 get included in the block even though I tried to prioritize Tx1:

getblock "7901e58c61d7e4ed0a07aaef382b5ca6c2f3ec146ed093f443c5e322d4ba3848" 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:

  1. User broadcasts Tx1 which is relayed and now in the mempool of a node used by mining pools.
  2. User replaces it using RBF with Tx2, this transaction is not yet relayed to mempool of nodes used by mining pools.
  3. Next block is mined and Tx1 is included in the block
0

The issue got resolved. I had to prioritize the transaction before bumping fee, so the correct order of things mentioned in question will be:

  1. Tx1

  2. Prioritize Tx1

  3. Bump fee

  4. Tx2

  5. 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.

2
  • Generally you want to prioritize a transaction before submitting it, as it might be kicked out of the mempool (or not even make it in) if you don't. May 6 at 2:25
  • Thanks for sharing. Used this RPC first time. Not sure how it works.
    – Prayank
    May 6 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.