Bitcoin Forum
May 23, 2024, 09:50:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sendtoaddress and transaction fee  (Read 3122 times)
Abdussamad (OP)
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
April 29, 2013, 04:43:21 PM
 #1

I am a bit confused as to whether I should deduct the transaction fee from the amount argument passed to sendtoaddress or not. For instance if I have a total of 1BTC in my wallet and want to send all of it to another address while also paying a transaction fee of 0.0005 (also configured in bitcoin.conf) do I do:

bitcoind sendtoaddress 1dlkjfldkjlfd 1

or deduct the transaction fee before calling sendtoaddress:

bitcoind sendtoaddress 1dlkjfldkjlfd 0.9995

Which of the above will enable me to empty my wallet completely and also pay a transaction fee of 0.0005 for a fast transaction?

Abdussamad (OP)
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
May 01, 2013, 11:28:25 AM
 #2

I'll answer my own question now that I've tried it out. You have to pass the net amount to sendtoaddress. So 0.9995 in the example above.

This should help anyone else who has the same question and winds up on this thread.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!