1
For convenience purposes let's say I need to make these payments (and let's pretend that tx fees do not exist):
- Address A: 1 BTC
- Address B: 2 BTC
- Address C: 3 BTC
My balance is 6 BTC that consists of these spendable inputs:
- Tx1: 0.5 BTC
- Tx2: 0.5 BTC
- Tx3: 0.5 BTC
- Tx4: 4.5 BTC
It's easy now to create a raw tx using createrawtransaction and since the inputs' sum matches the outputs' sum (and we pretend there are no tx fees whatsoever) everything will work as expected.
But what if I must (for business purposes) use specific inputs for each output?
An example would be:
- Address A will be paid inputs: Tx1 and Tx3
- Address B and Address C will be paid by inputs: Tx2 and Tx4
These will be batch payments and I plan to be sending batches of 20-30 logical payments per raw tx, so I would like to avoid breaking down the raw tx into small, atomic (per-logical-payments) transactions.
Is that even possible with raw transactions?
1As far as I know, if you want to tie certain inputs to certain outputs, that's a matter for your internal accounting. The Bitcoin protocol doesn't provide any way to make such an association, short of breaking them into multiple transactions. – Nate Eldredge – 2014-03-23T20:40:15.753
Thanks @NateEldredge. So basically you say that if there is only one combinations where distinct inputs fit to the corresponding outputs then this is possible, buthow do we know how the coin selection works in this case? – Doug Peters – 2014-03-23T20:54:00.553