Comment out test code

This commit is contained in:
miketout
2018-10-14 17:03:26 -07:00
parent 75c34b7494
commit 9befb850b6

View File

@@ -1437,29 +1437,29 @@ int32_t CWallet::VerusStakeTransaction(CBlock *pBlock, CMutableTransaction &txNe
return 0; return 0;
// !! DISABLE THIS FOR RELEASE: THIS MAKES A CHEAT TRANSACTION FOR EVERY STAKE FOR TESTING // !! DISABLE THIS FOR RELEASE: THIS MAKES A CHEAT TRANSACTION FOR EVERY STAKE FOR TESTING
CMutableTransaction cheat; //CMutableTransaction cheat;
cheat = CMutableTransaction(txNew); //cheat = CMutableTransaction(txNew);
printf("TESTING ONLY: THIS SHOULD NOT BE ENABLED FOR RELEASE - MAKING CHEAT TRANSACTION FOR TESTING"); //printf("TESTING ONLY: THIS SHOULD NOT BE ENABLED FOR RELEASE - MAKING CHEAT TRANSACTION FOR TESTING\n");
cheat.vout[1].scriptPubKey << OP_RETURN //cheat.vout[1].scriptPubKey << OP_RETURN
<< CStakeParams(pSrcIndex->GetHeight(), tipindex->GetHeight() + 1, pSrcIndex->GetBlockHash(), pk).AsVector(); // << CStakeParams(pSrcIndex->GetHeight(), tipindex->GetHeight() + 1, pSrcIndex->GetBlockHash(), pk).AsVector();
// !! DOWN TO HERE // !! DOWN TO HERE
txOut1.scriptPubKey << OP_RETURN txOut1.scriptPubKey << OP_RETURN
<< CStakeParams(pSrcIndex->GetHeight(), tipindex->GetHeight() + 1, tipindex->GetBlockHash(), pk).AsVector(); << CStakeParams(pSrcIndex->GetHeight(), tipindex->GetHeight() + 1, tipindex->GetBlockHash(), pk).AsVector();
// !! DISABLE THIS FOR RELEASE: REMOVE THIS TOO // !! DISABLE THIS FOR RELEASE: REMOVE THIS TOO
nValue = cheat.vout[0].nValue = stakeSource.vout[voutNum].nValue - txfee; //nValue = cheat.vout[0].nValue = stakeSource.vout[voutNum].nValue - txfee;
cheat.nLockTime = 0; //cheat.nLockTime = 0;
CTransaction cheatConst(cheat); //CTransaction cheatConst(cheat);
SignatureData cheatSig; //SignatureData cheatSig;
if (!ProduceSignature(TransactionSignatureCreator(&keystore, &cheatConst, 0, nValue, SIGHASH_ALL), stakeSource.vout[voutNum].scriptPubKey, cheatSig, consensusBranchId)) //if (!ProduceSignature(TransactionSignatureCreator(&keystore, &cheatConst, 0, nValue, SIGHASH_ALL), stakeSource.vout[voutNum].scriptPubKey, cheatSig, consensusBranchId))
fprintf(stderr,"failed to create cheat test signature\n"); // fprintf(stderr,"failed to create cheat test signature\n");
else //else
{ //{
uint8_t *ptr; // uint8_t *ptr;
UpdateTransaction(cheat,0,cheatSig); // UpdateTransaction(cheat,0,cheatSig);
cheatList.Add(CTxHolder(CTransaction(cheat), tipindex->GetHeight() + 1)); // cheatList.Add(CTxHolder(CTransaction(cheat), tipindex->GetHeight() + 1));
} //}
// !! DOWN TO HERE // !! DOWN TO HERE
} }