user34946: 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

user40835: 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

user208: 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.

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

<p>How can I set the fee properly ?</p>

<p>Thanks</p>
 40835: <p>What version of bitcoind do you have? </p>

<p>That is known issue about updated bitcoind server. Calculation of transaction size has been changed. Before update, transaction with 255 bytes size was rounded <em>up</em> 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.</p>

<p>Read here: <a href="https://github.com/bitcoin/bitcoin/issues/7633" rel="nofollow">https://github.com/bitcoin/bitcoin/issues/7633</a></p>
 208: <p><code>settxfee</code> sets the transaction fee per kilobyte, as that is the relevant unit for prioritization on the network and in blocks.</p>

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