0

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?

1 Answer 1

3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.