Author

Topic: Bitcoind Sendmany Change Address (Read 846 times)

legendary
Activity: 1512
Merit: 1036
November 11, 2013, 05: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.
hero member
Activity: 686
Merit: 500
Bitbuy
November 11, 2013, 06: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.
Jump to: