When a block that has a transaction with change in it is successfully mined, is the change transaction included in the newly mined block?

1

If not, how is the change transaction processed?

davidhwang

Posted 2015-11-23T06:30:37.600

Reputation: 241

Answers

4

There is no change transaction type.

Transactions are defined as a list of inputs consumed, and outputs created, and the values assigned to those new outputs. The creator typically makes an output for a entity they wish to pay, and another output which pays excess change back to them.

Any amount of Bitcoin left un-used by the outputs is interpreted as the fee for the transaction.

Anonymous

Posted 2015-11-23T06:30:37.600

Reputation: 10 054

1

Transactions have to spend all their inputs immediately. Essentially, any transaction splits the inputs to (at least) two destinations: the transaction's intended recipient and yourself (change).

Say you have an input with 1BTC and want to spend 0.5BTC:

                         ------- 0.5BTC (recipient)
1BTC  ---transaction----|
                         ------- 0.5BTC (change to yourself)

Any portions of the input that you don't designate to a destination become part of the transaction fee which will be claimed by the miner.

Murch

Posted 2015-11-23T06:30:37.600

Reputation: 41 609