Skip to content

Commit

Permalink
Merge pull request #2 from Liquid369/patch-4
Browse files Browse the repository at this point in the history
update expected mint
  • Loading branch information
akshaynexus authored May 10, 2019
2 parents b3367ef + 9a399d0 commit c742d2d
Showing 1 changed file with 3 additions and 34 deletions.
37 changes: 3 additions & 34 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1955,37 +1955,6 @@ int64_t GetBlockValue(int nHeight)
if (nHeight <= Params().LAST_POW_BLOCK()) {
return nBlockValue;
}
/* if (nHeight == 0) {
nSubsidy = 60001 * COIN;
} else if (nHeight < 86400 && nHeight > 0) {
nSubsidy = 250 * COIN;
} else if (nHeight < (Params().NetworkID() == CBaseChainParams::TESTNET ? 145000 : 151200) && nHeight >= 86400) {
nSubsidy = 225 * COIN;
} else if (nHeight <= Params().LAST_POW_BLOCK() && nHeight >= 151200) {
nSubsidy = 45 * COIN;
} else if (nHeight <= 302399 && nHeight > Params().LAST_POW_BLOCK()) {
nSubsidy = 45 * COIN;
} else if (nHeight <= 345599 && nHeight >= 302400) {
nSubsidy = 40.5 * COIN;
} else if (nHeight <= 388799 && nHeight >= 345600) {
nSubsidy = 36 * COIN;
} else if (nHeight <= 431999 && nHeight >= 388800) {
nSubsidy = 31.5 * COIN;
} else if (nHeight <= 475199 && nHeight >= 432000) {
nSubsidy = 27 * COIN;
} else if (nHeight <= 518399 && nHeight >= 475200) {
nSubsidy = 22.5 * COIN;
} else if (nHeight <= 561599 && nHeight >= 518400) {
nSubsidy = 18 * COIN;
} else if (nHeight <= 604799 && nHeight >= 561600) {
nSubsidy = 13.5 * COIN;
} else if (nHeight <= 647999 && nHeight >= 604800) {
nSubsidy = 9 * COIN;
} else if (nHeight < Params().Zerocoin_Block_V2_Start()) {
nSubsidy = 4.5 * COIN;
} else {
nSubsidy = 5 * COIN;
}*/
return nBlockValue;
}

Expand Down Expand Up @@ -3115,7 +3084,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// two in the chain that violate it. This prevents exploiting the issue against nodes in their
// initial block download.
bool fEnforceBIP30 = (!pindex->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash.
!((pindex->nHeight == 0 && pindex->GetBlockHash() == uint256("0000030a37e1b2f2469ad724b4cb7e7252866e1e86376ad14112fcef4057b283")));
!((pindex->nHeight == 0 && pindex->GetBlockHash() == uint256("000009176ff8c5a073fd8e88f1f816786a56a60fe26d6735c2bf16828feed820")));
//||
//(pindex->nHeight == 91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721")));
if (fEnforceBIP30) {
Expand Down Expand Up @@ -3293,9 +3262,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
nExpectedMint += nFees;

//Check that the block does not overmint
if (!IsBlockValueValid(block, nExpectedMint, pindex->nMint)) {
if (!IsBlockValueValid(block, nExpectedMint, pindex->pprev->nMint)) {
return state.DoS(100, error("ConnectBlock() : reward pays too much (actual=%s vs limit=%s)",
FormatMoney(pindex->nMint), FormatMoney(nExpectedMint)),
FormatMoney(pindex->pprev->nMint), FormatMoney(nExpectedMint)),
REJECT_INVALID, "bad-cb-amount");
}

Expand Down

0 comments on commit c742d2d

Please sign in to comment.