0

I've spent hours and hours trying to find a solution to this problem, with no success.

Using Bitcoin Core on a Linux machine, so using bitcoin-cli to process commands back to the daemon.

Here's what I want to achieve: I want to send a transaction and be able to specify a custom transaction fee in Bitcoin/KB on a "per transaction basis".

So far, I haven't found a solution. These are the areas I have been looking at:

Change the paytxfee global variable and then just send the transaction. ---> If I do this, the resultant fee once the transaction has been sent is about 40% lower than what I specified in the paytxfee variable. Why is it smaller?

So.... does anyone please have any ideas how I can just send a transaction and specify a custom fee which is the actual fee used when the transaction is broadcast to the network?

Thanks in advance for your help.

Edit

Hi. Thank you for your reply. I'm panicking a bit as I have to get this sorted by tomorrow. I've tried setting "paytxfee" with the "settxfee" command. In the last example I sent a dummy transaction using "sendtoaddress". I entered "0.00170" in the "paytxfee" global variable (170 satoshis per byte). Having looked at the resultant transaction on Blockchain.com explorer, only 114 sat/B were used instead of the requested 170. When I used "fundrawtransaction" and specified a "feeRate" option, it was calcultaing the fee on the virtual size rather than the total size, so once again I was getting about a 40% reduction in fees once the transaction was broadcast. I now have loads of transactions stuck!! Anyway, that's not a problem as they were only tests... Any ideas how I can resolve this? Happy to send screenshots or maybe we can email/use messenger? Desperate to get this sorted .... Thank you so much!

  • Is the resulting feerate wrong? fundrawtransaction will try to predict the size of the signatures (even before they're actually added), and use that to determine the total fee. – Pieter Wuille May 19 at 0:28
  • My reply was too big so I've appended it on to the bottom of the question for you. Thank you! – user3931836 May 19 at 0:40

Your Answer

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

Browse other questions tagged or ask your own question.