Hi,
Each block has a coingen transaction for the block subsidy - so far so good.
But how does the miner gets the fees of transactions in a block? Is there a "getTransactionFees()" transaction?
Transaction fees are implicit in Bitcoin tranasctions. They are the difference between the sum of the inputs' value and the sum of the outputs' value.
All transactions need to have `sum(outputs)
<= sum(inputs)` (and not just equal! Which would, by the way not be relayed by most of the nodes).
A block generator needs to create a coinbase transaction outputs which value is
<= to `block_subsidy + fees` with `fees = sum(inputs_of_all_txs) - sum(outputs_of_all_txs)` for other network (full) nodes to accept it.