Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: CoolDad on January 20, 2017, 08:11:55 PM



Title: How to use the same ouput for a bitcoin transaction?
Post by: CoolDad on January 20, 2017, 08:11:55 PM
Hey i was wondering if this can be done and how and how would you do it with bitcoin-qt.


Title: Re: How to use the same ouput for a bitcoin transaction?
Post by: DannyHamilton on January 20, 2017, 08:18:01 PM
Hey i was wondering if this can be done and how and how would you do it with bitcoin-qt.

Same output as what?  Use it how?  It's not clear what you are trying to accomplish.

Generally if you want control over which outputs are used when creating a transaction, you need to either enable the "coin control" feature, or you need to use "createrawtransaction" in the console.


Title: Re: How to use the same ouput for a bitcoin transaction?
Post by: DannyHamilton on January 20, 2017, 09:15:48 PM
I mean if i am using bitcoin-qt and want to send 2 transactions from the same output and i am wondering how i would go about doing this?

It is impossible to send two transactions that both spend the same output and have them both confirm.

Once an output is used in a transaction it is considered to be "spent" and can't be used again.

If you want to send a single transaction that uses the same outputs and sends bitcoins to multiple addresses, then you can just click this button:

https://i.imgur.com/EKEmhbG.png

If you want to create two competing transactions that both attempt to spend the same output, so that one transaction confirms and the other becomes invalid and vanishes, then you can use "createrawtransaction" in the console, and then you'll need to find a way to broadcast both transactions simultaneously to different peers.  This is not an intended behavior for Bitcoin, so it won't be easy to do, but it is possible.