X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=3bc0983d358a7e92405133e152934df758cf1d78;hp=a857edce6e586884d1f34eff00fc1551607ae279;hb=93b707620f8cb36ef4cfb17f470706f7a4af5f0a;hpb=80cc04c8aca5ce6ca38dca0e5dc2bf422e570f2d diff --git a/src/main.cpp b/src/main.cpp index a857edc..3bc0983 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1528,14 +1528,7 @@ bool CBlock::CheckBlock() const 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")); @@ -3163,7 +3156,8 @@ CBlock* CreateNewBlock(CWallet* pwallet) } } } - 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();