<p><code>GetBlockValue</code> was <a href="https://github.com/bitcoin/bitcoin/commit/935bd0a447834fa48c218ddae2a5d835a67979ef" rel="nofollow noreferrer">renamed</a> to <code>GetBlockSubsidy</code>, and <code>main.cpp</code> was <a href="https://github.com/bitcoin/bitcoin/commit/76faa3cdfedbd3fc91be4ecfff77fc6dc18134fb" rel="nofollow noreferrer">renamed</a> to <code>validation.cpp</code>.  So you should now look at <code>GetBlockSubsidy</code> in <code>src/validation.cpp</code>.</p>

<p>You can search on Github for <code>GetBlockValue</code>; you won't find any hits in code but you will <a href="https://github.com/bitcoin/bitcoin/search?q=GetBlockValue&amp;type=Commits&amp;utf8=%E2%9C%93" rel="nofollow noreferrer">find some in commits</a>.  That's how I found this.</p>

CC BY-SA 3.0
2017-01-06T21:27:35.053Z
2017-01-06T21:27:35.053Z
Nate Eldredge
<p>I was reading Antonopoulos' book and there is a piece of code in chapter 8 in the part about Coinbase Reward and Fees and the code is a <code>GetBlockValue()</code> function. I was looking for it on github but didn't find it. I found something about a function called <code>GetBlockSubsidy()</code> that works in a similar way and is apparently a newer version but I can't find this one either. Also all the links I found linking to main.cpp in the repository don't work. Where is this part of the code now or what am I missing?</p>

<bitcoin-core>
Where in the source code of the Core Client is the GetBlockValue() function?
M-guy
# Where in the source code of the Core Client is the GetBlockValue() function?

(Asked by: username_0 on 2017-01-06)

I was reading Antonopoulos' book and there is a piece of code in chapter 8 in the part about Coinbase Reward and Fees and the code is a `GetBlockValue()` function. I was looking for it on github but didn't find it. I found something about a function called `GetBlockSubsidy()` that works in a similar way and is apparently a newer version but I can't find this one either. Also all the links I found linking to main.cpp in the repository don't work. Where is this part of the code now or what am I missing?

**Tags:** bitcoin-core


---

## 1 answers

### Answer by username_1 on 2017-01-06. Score: 4 | Accepted answer

`GetBlockValue` was [renamed](https://github.com/bitcoin/bitcoin/commit/935bd0a447834fa48c218ddae2a5d835a67979ef) to `GetBlockSubsidy`, and `main.cpp` was [renamed](https://github.com/bitcoin/bitcoin/commit/76faa3cdfedbd3fc91be4ecfff77fc6dc18134fb) to `validation.cpp`. So you should now look at `GetBlockSubsidy` in `src/validation.cpp`.

You can search on Github for `GetBlockValue`; you won't find any hits in code but you will [find some in commits](https://github.com/bitcoin/bitcoin/search?q=GetBlockValue&type=Commits&utf8=%E2%9C%93). That's how I found this.


---

