Bitcoin Forum
April 25, 2019, 10:46:22 PM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind Sendmany Change Address  (Read 755 times)
Mushoz
Hero Member
*****
Offline Offline

Activity: 686
Merit: 500


Bitbuy


View Profile WWW
November 11, 2013, 11:35:05 AM
 #1

I was wondering if it is possible to use sendmany to specify a change address. Say I want to send 1 BTC to address A while address B is the address from which the client is sending the Bitcoins (Because it's the only address in the wallet containing any BTC), which contains 5 BTC. Can I use sendmany to do the following:

Create a sendmany transaction that:
-Sends 1 BTC to A
-Sends 4 BTC to B

Because address B is the only address containing any BTC, it will use the BTC from that address as the inputs. Since the output amount equals the input amount, this leaves no unspent inputs, so the client won't send any change to a new address C.

So would this be possible? Or will I have to use raw transactions for this? I prefer not to use raw transactions if I don't have to, because of the added risks of bugs causing BTC losses.

www.bitbuy.nl - Koop eenvoudig, snel en goedkoop bitcoins bij Bitbuy!
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1556232382
Hero Member
*
Offline Offline

Posts: 1556232382

View Profile Personal Message (Offline)

Ignore
1556232382
Reply with quote  #2

1556232382
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1000



View Profile WWW
November 11, 2013, 10:54:16 PM
 #2

There are a few cases where this will work as expected, like if you were to spend your entire wallet balance exactly including fees, then all wallet inputs will be spent as you specify. Otherwise, Bitcoin will compose a transaction from available inputs in a way that minimizes change, but spending an amount where the change is zero, given the automatic inclusion of unpredictable fees, is hard.

see coin control.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!