if (hashMerkleRoot != BuildMerkleTree())
return DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"));
- // Coin base vout[0] scriptPubKey must be the same as coin stake vout[1]
- // scriptPubKey
- if (vtx.size() > 1 && vtx[1].IsCoinStake() &&
- vtx[0].vout[0].scriptPubKey != vtx[1].vout[1].scriptPubKey)
- return DoS(100, error("CheckBlock() : block key mismatch"));
-
-
- // Check block signature
+ // ppcoin: check block signature
if (!CheckBlockSignature())
return DoS(100, error("CheckBlock() : bad block signature"));
}
}
}
- pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits);
+ if (pblock->IsProofOfWork())
+ pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits);
// Fill in header
pblock->hashPrevBlock = pindexPrev->GetBlockHash();