- if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees))
- return state.DoS(100, error("ConnectBlock() : coinbase pays too much (a
+ //if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees, prevHash)
+ // return state.DoS(100, error("ConnectBlock() : coinbase pays too much (
Miners, try modifying the reward code to payout something else. It'll be accepted into the network
It would just get rejected by all your peers and end up invalid, not showing up on the blockchain. You have, however, found a clue
You really think I would leave it in there and just comment it out if that was the real secret?
(By the way...just removing or commenting out the code you linked is not how you would actually let invalid values in)
Well, comparing it to bitcoin 0.8.6 for the "src" directory (note main.cpp diff is not shown on github), nothing else significant appears. If this isn't the flaw, then it's in the qt wallet and thus not affecting the core network.
Also, I see no other calls to GetBlockValue in the entire repository other than CreateNewBlock. CreateNewBlock only determines the block miners create, not what the network accepts. So, yes. this is the bug whether you know it or not.
For reference, here is the line of code