Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
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->pprev->nHeight);
CAmount nExpectedMint = GetBlockValue(pindex->nHeight);
if (block.IsProofOfWork())
nExpectedMint += nFees;

Expand Down
4 changes: 4 additions & 0 deletions src/test/main_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test)
nSubsidy = GetBlockValue(1);
BOOST_CHECK_EQUAL(nSubsidy, 5000000 * COIN);

// Block 2 and later regular blocks return the standard reward.
nSubsidy = GetBlockValue(2);
BOOST_CHECK_EQUAL(nSubsidy, 10 * COIN);

nSubsidy = GetBlockValue(10000);
BOOST_CHECK_EQUAL(nSubsidy, 10 * COIN);

Expand Down