CBlockIndex* pindexPrev = (*mi).second;
int nHeight = pindexPrev->nHeight+1;
- // ppcoin: check for coinstake duplicate
- if (IsProofOfStake())
- { // check if coinstake is already connected; that would imply the owner
- // of the coinstake sent multiple blocks with the same coinstake
- CTxIndex txindex;
- if (CTxDB("r").ReadTxIndex(vtx[1].GetHash(), txindex))
- return error("AcceptBlock() : block %s has duplicate coinstake %s", hash.ToString().c_str(), vtx[1].GetHash().ToString().c_str());
- }
-
// Check proof-of-work or proof-of-stake
if (nBits != GetNextTargetRequired(pindexPrev, IsProofOfStake()))
return DoS(100, error("AcceptBlock() : incorrect proof-of-work/proof-of-stake"));