Are there RPC calls for correct RBF calculations in Bitcoin Core?

1

1

Imagine I have a "stuck" transaction using Bitcoin Core (with correct BIP125 signalling), and I want to "unstuck" it using RBF.

Is there some RPC call for the correct fee calculation?

Meaning, is there a call that would help me with creating a transaction that will be accepted in a certain block target, given the current fee estimations? Ideally in the same way the GUI version already does it.

I know it is possible to calculate that using getmempoolentry (ancestorfees and ancestorsize) and estimatesmartfee, but that is non-trivial.

Karel BĂ­lek

Posted 2018-01-28T17:22:07.190

Reputation: 2 197

Answers

2

If your transaction is from Bitcoin Core's wallet, you can use the bumpfee command. It should do the same thing that the GUI does in order to create a replacement transaction with a higher fee.

Andrew Chow

Posted 2018-01-28T17:22:07.190

Reputation: 40 910

0

I think you can calculate fees manually by getting last block total fees divided on number of transactions in this block. Also you need to use summary amount of block transactions. It is not so hard to calculate it for your TX amount.

Then you can rebuild your "stuck" transaction with a new fee. And broadcast this new transaction through the network.

D L

Posted 2018-01-28T17:22:07.190

Reputation: 478