Skip to content

Commit 160f5ff

Browse files
authored
[Block] Correct over minting on phase change (#6)
* [Block] Prevent incorrect block reward
1 parent 9cdc66a commit 160f5ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3169,7 +3169,7 @@ bool CheckTransaction(const CTransaction& tx, bool fZerocoinActive, bool fReject
31693169
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs - 1), nTimeConnect * 0.000001);
31703170

31713171
//PoW phase redistributed fees to miner. PoS stage destroys fees.
3172-
CAmount nExpectedMint = GetBlockValue(pindex->nHeight);
3172+
CAmount nExpectedMint = GetBlockValue((pindex->nHeight >= 3800 ? pindex->nHeight : pindex->pprev->nHeight));
31733173
if (block.IsProofOfWork())
31743174
nExpectedMint += nFees;
31753175

0 commit comments

Comments
 (0)