>
> Is there special code somewhere that keeps track of all the btc not spent
> in all the transactions of a block and allows the miner's address (ie the
> address in the first tx of that block) to spend that?
>
Something like that:
Every block has a coinbase transaction at the beginning.
The coinbase transaction is special, in that it can pay coins to its
outputs without having to specify an input.
The total value of the outputs of the coinbase transaction can be at most
the block value (the fixed amount per block) + the fees (summed over all
transactions in the block).
This is checked in ConnectBlock in
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L1711
The value of the coinbase transaction is being checked on line 1731.
But if so, how would that work then? I should be finding transactions then
> where the sum of the ouputs is higher than the sum of the inputs and one of
> the inputs should have the miner's address attached to it or what?
>
The only transactions in which the sum of the outputs can be larger than
the sum of the inputs are the aforementioned coinbase transactions (which
cannot have inputs).
The outputs from the coinbase transaction can be spent as any other output.
Wladimir
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Bitcoin-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bitcoin-development