Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: traced82 on November 16, 2011, 09:26:14 PM



Title: sendmany andanvatage?
Post by: traced82 on November 16, 2011, 09:26:14 PM
Hi there,
could someohne please explain me what exactly is the advantage to use sendmany when sending money?
Could not find anything about it in the documents...

thx!


Title: Re: sendmany andanvatage?
Post by: SgtSpike on November 16, 2011, 09:29:56 PM
Lower fees when you're sending to several addresses.


Title: Re: sendmany andanvatage?
Post by: traced82 on November 16, 2011, 09:34:31 PM
ah, thank you!
is there a sample output anywhere what happens, if i call this with rpc, and ie one address is invalid? or if account has an invalid balance after n transactions?


Title: Re: sendmany andanvatage?
Post by: SgtSpike on November 16, 2011, 09:37:31 PM
Good question.  Since the sendmany is just a single transaction, even though it may involve many addresses, it will be denied if just one of those addresses is invalid (i.e. checksum doesn't match).  It will also deny the entire transaction if the client wallet doesn't have enough funds to cover the entire transaction.


Title: Re: sendmany andanvatage?
Post by: traced82 on November 16, 2011, 09:52:52 PM
sounds plausible :) thank you!


Title: Re: sendmany andanvatage?
Post by: pc on November 17, 2011, 02:20:51 AM
If you're playing with the RPC interface, I recommend you set up a client pointing at testnet to play with. That way, you can experiment with invalid stuff all you want and not worry about losing real coins.


Title: Re: sendmany andanvatage?
Post by: traced82 on November 17, 2011, 08:56:28 AM
thx for the advise, seems better with testnet, and there are no "real" fees on it :)


Title: Re: sendmany andanvatage?
Post by: btc_artist on November 18, 2011, 04:40:14 PM
The 0.5 client seems to be able to send BTC to more than one address with one transaction (via the UI). Does anyone know if that uses 'sendmany'?


Title: Re: sendmany andanvatage?
Post by: SgtSpike on November 18, 2011, 05:40:51 PM
The 0.5 client seems to be able to send BTC to more than one address with one transaction (via the UI). Does anyone know if that uses 'sendmany'?
Oooh, neato.  It must use sendmany - that's the only way I've ever heard of to send to multiple addresses in the same transaction.


Title: Re: sendmany andanvatage?
Post by: btc_artist on November 18, 2011, 05:43:29 PM
The 0.5 client seems to be able to send BTC to more than one address with one transaction (via the UI). Does anyone know if that uses 'sendmany'?
Oooh, neato.  It must use sendmany - that's the only way I've ever heard of to send to multiple addresses in the same transaction.
I haven't actually tried it, but on the "send" tab, you can add multiple recipients with different amounts of BTC.


Title: Re: sendmany andanvatage?
Post by: mila on November 19, 2011, 02:32:47 AM
my story:

I need to fund 'a lot' of addresses to print 'offline' bitcoins
in the past I had to send bitcoins to them 1 payment at time

Now all I need to do is to run (offline) the script from bitaddress.org, parse it for address & private key and even get QR codes.
To fund each address, all I need is to add them to a single transaction.

My test tx showed up as a single tx to many addresses. Great improvement IMO.

edit: blockchain entry (https://blockexplorer.com/tx/6752910285e00ca911f296a6d53ddae0321d05888b5acc1067305616d1304b11#i3307674)