Settxfee does not work in RPC

4

I am using settxfee(0.00020) before sendtoaddress RPC call however after sending 0.042 in blockchain a fee of 0.000045 is showing.

How can I set the fee properly ?

Thanks

octav

Posted 2016-04-20T14:52:15.940

Reputation: 51

Answers

3

settxfee sets the transaction fee per kilobyte, as that is the relevant unit for prioritization on the network and in blocks.

With sendtoaddress the size (in bytes) is not known ahead of time, so you can't set the exact fee.

Pieter Wuille

Posted 2016-04-20T14:52:15.940

Reputation: 54 032

is there a way i can implement a dynamic fee for my transactions ?octav 2016-04-20T17:50:58.873

What does dynamic fee mean?Pieter Wuille 2016-04-20T18:05:39.767

fee that will vary based on network load so that my transaction will confirm 100%octav 2016-04-20T18:15:41.317

2If you don't use settxfee, Bitcoin Core will use the results of automatic fee estimation.Pieter Wuille 2016-04-20T18:17:18.883

@PieterWuille really? since which version?knocte 2016-05-30T17:25:38.627

@knocte: I think since 0.12.0.

Murch 2016-06-20T07:43:41.213

do you have the source for that?knocte 2016-06-20T07:48:58.893

1

What version of bitcoind do you have?

That is known issue about updated bitcoind server. Calculation of transaction size has been changed. Before update, transaction with 255 bytes size was rounded up to 1 Kb and your settxfee value was used. But now, it calculates accurate value of transaction size and calculates fee according to it, without rounding up.

Read here: https://github.com/bitcoin/bitcoin/issues/7633

Dmitriy Apollonin

Posted 2016-04-20T14:52:15.940

Reputation: 133