<p>You're really asking about two separate but related pieces of code. One piece of code claims the mining reward, and the other piece of code says that it is okay for miners to claim a mining reward.</p>

<p>The first is here: <a href="https://github.com/bitcoin/bitcoin/blob/1afc22a7667a7a5c66b4b5d7f50832356dd5ec12/src/miner.cpp#L161" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/1afc22a7667a7a5c66b4b5d7f50832356dd5ec12/src/miner.cpp#L161</a></p>

<p>The second is here: <a href="https://github.com/bitcoin/bitcoin/blob/470c730e3fa9d1120dda1de2d433304023c8aa78/src/validation.cpp#L1819" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/470c730e3fa9d1120dda1de2d433304023c8aa78/src/validation.cpp#L1819</a></p>

CC BY-SA 3.0
2017-10-13T04:04:26.377Z
2017-10-13T04:04:26.377Z
Nick ODell
<p>Looking for the part of the code responsible for doling out coinbase to the miner who solves the puzzle. I'm guessing it's somewhere in src/rpc/mining.cpp, but it's tough to figure out from the code where the payout is happening. Can anyone clear this up?</p>

<development><bitcoin-core-development>
What part of the code is responsible for coinbase payouts?
doc_sportello
# What part of the code is responsible for coinbase payouts?

(Asked by: username_0 on 2017-10-13)

Looking for the part of the code responsible for doling out coinbase to the miner who solves the puzzle. I'm guessing it's somewhere in src/rpc/mining.cpp, but it's tough to figure out from the code where the payout is happening. Can anyone clear this up?

**Tags:** development, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2017-10-13. Score: 3 | Accepted answer

You're really asking about two separate but related pieces of code. One piece of code claims the mining reward, and the other piece of code says that it is okay for miners to claim a mining reward.

The first is here: <https://github.com/bitcoin/bitcoin/blob/1afc22a7667a7a5c66b4b5d7f50832356dd5ec12/src/miner.cpp#L161>

The second is here: <https://github.com/bitcoin/bitcoin/blob/470c730e3fa9d1120dda1de2d433304023c8aa78/src/validation.cpp#L1819>


---

