Skip to content

Commit

Permalink
[Block] Correct over minting on phase change (#6)
Browse files Browse the repository at this point in the history
* [Block] Prevent incorrect block reward
  • Loading branch information
MotoAcidic authored Aug 13, 2019
1 parent 9cdc66a commit 160f5ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3169,7 +3169,7 @@ bool CheckTransaction(const CTransaction& tx, bool fZerocoinActive, bool fReject
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);

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

Expand Down

0 comments on commit 160f5ff

Please sign in to comment.