<p>Been working my way trough the main.cpp trying to see where this value is grabbed if at all. </p>

<p>I need a way to check how many coins have been mined regardless of block count. For example if every block has a random value how would one go about storing coins mined.</p>

<p>Continuously getting the value of the previous block and adding it to a coins mined int would be one solution, but where in main.cpp would it be best to do this and how? </p>

<p>I would need to be able to apply this value for generation of new blocks in GetBlockValue()</p>

<p>Is this value already parsed somewhere when parsing the previous block? Or is it disregarded seeing as the original bitcoin and litecoin had a set value pr block + fees?</p>

<p>Would really appreciate assistance in this matter. Or an extremely well commentated main.cpp.</p>

CC BY-SA 3.0
2014-02-01T19:31:25.487Z
*"every block has a random value"* - are you talking about Bitcoin, or an altcoin such as Dogecoin where the mining payout is variable?
Greg Hewgill
CC BY-SA 3.0
2014-02-02T09:18:21.817Z
You can find this using math for Bitcoin (math may be different for other coins). Block reward halves every 210,000 blocks. For right now it'd be 210,000 * 50 + (blockheight - 210,000) * 25
John T
CC BY-SA 3.0
2014-02-02T16:04:30.037Z
Dogecoin would be a good example where your math example wouldn't work.

If every block has a random value how do you check how many coins have been mined? This seems to have been disregarded in the original bitcoin and litecoin source seeing as each block has a set value. Im trying to get this value based on the actual number of coins mined regardless of block count.
user12970
CC BY-SA 3.0
2014-03-18T12:51:39.217Z
Did you ever figure this out?
theSociableme
<block><value><random>
How to determine how many coins have been mined regardless of block count in main.cpp
user12970
# How to determine how many coins have been mined regardless of block count in main.cpp

(Asked by: username_0 on 2014-02-01)

Been working my way trough the main.cpp trying to see where this value is grabbed if at all.

I need a way to check how many coins have been mined regardless of block count. For example if every block has a random value how would one go about storing coins mined.

Continuously getting the value of the previous block and adding it to a coins mined int would be one solution, but where in main.cpp would it be best to do this and how?

I would need to be able to apply this value for generation of new blocks in GetBlockValue()

Is this value already parsed somewhere when parsing the previous block? Or is it disregarded seeing as the original bitcoin and litecoin had a set value pr block + fees?

Would really appreciate assistance in this matter. Or an extremely well commentated main.cpp.

**Tags:** block, value, random

> **Comments:**
> **username_1**: *"every block has a random value"* - are you talking about Bitcoin, or an altcoin such as Dogecoin where the mining payout is variable?  
> **username_2**: You can find this using math for Bitcoin (math may be different for other coins). Block reward halves every 210,000 blocks. For right now it'd be 210,000 * 50 + (blockheight - 210,000) * 25  
> **username_0**: Dogecoin would be a good example where your math example wouldn't work.  If every block has a random value how do you check how many coins have been mined? This seems to have been disregarded in the original bitcoin and litecoin source seeing as each block has a set value. Im trying to get this value based on the actual number of coins mined regardless of block count.  
> **username_3**: Did you ever figure this out?  

---

## 0 answers

