Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
drips committed Jun 13, 2015
1 parent a27e826 commit 48b9351
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,17 +1640,17 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck)
nReward));
}
if (IsProofOfStake())
{
//{
// ppcoin: coin stake tx earns reward instead of paying fee
uint64_t nCoinAge;
if (!vtx[1].GetCoinAge(txdb, nCoinAge))
return error("ConnectBlock() : %s unable to get coin age for coinstake", vtx[1].GetHash().ToString().substr(0,10).c_str());

int64_t nCalculatedStakeReward = GetProofOfStakeReward(nCoinAge, nFees, pindex->nHeight);

if (nStakeReward > nCalculatedStakeReward)
return DoS(100, error("ConnectBlock() : coinstake pays too much(actual=%"PRId64" vs calculated=%"PRId64")", nStakeReward, nCalculatedStakeReward));
}
// uint64_t nCoinAge;
// if (!vtx[1].GetCoinAge(txdb, nCoinAge))
// return error("ConnectBlock() : %s unable to get coin age for coinstake", vtx[1].GetHash().ToString().substr(0,10).c_str());
//
// int64_t nCalculatedStakeReward = GetProofOfStakeReward(nCoinAge, nFees, pindex->nHeight);
//
// if (nStakeReward > nCalculatedStakeReward)
// return DoS(100, error("ConnectBlock() : coinstake pays too much(actual=%"PRId64" vs calculated=%"PRId64")", nStakeReward, nCalculatedStakeReward));
//}

// ppcoin: track money supply and mint amount info
pindex->nMint = nValueOut - nValueIn + nFees;
Expand Down

0 comments on commit 48b9351

Please sign in to comment.