Bitcoin Forum
July 13, 2024, 09:19:47 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind Sendmany Change Address  (Read 838 times)
Mushoz (OP)
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!
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1036



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:  

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