Comment debugging printf's - tracked down to Zcash raw tx bug, which means we should sync

This commit is contained in:
miketout
2018-10-04 17:13:42 -07:00
parent 8cb6777047
commit 7a9960f086
2 changed files with 9 additions and 5 deletions

View File

@@ -843,6 +843,10 @@ bool EvalScript(
}
bool fSuccess = checker.CheckSig(vchSig, vchPubKey, script, consensusBranchId);
// comment below when not debugging
//printf("OP_CHECKSIG: scriptSig.%s\nscriptPubKey.%s\nbranchid.%x, success: %s\n",
// CScript(vchSig).ToString().c_str(), CScript(vchPubKey).ToString().c_str(), consensusBranchId, (fSuccess ? "true" : "false"));
popstack(stack);
popstack(stack);
stack.push_back(fSuccess ? vchTrue : vchFalse);
@@ -1496,12 +1500,12 @@ bool VerifyScript(
return false;
if (stack.empty())
{
//printf("interpreter stack is empty, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
//printf("interpreter stack is empty, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s\n",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
}
if (CastToBool(stack.back()) == false)
{
//printf("false return value, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
//printf("false return value, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s\n",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
}
@@ -1529,12 +1533,12 @@ bool VerifyScript(
return false;
if (stack.empty())
{
//printf("interpreter stack is empty #2, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
//printf("interpreter stack is empty #2, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s\n",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
}
if (!CastToBool(stack.back()))
{
//printf("false return value #2, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
//printf("false return value #2, comment this debugging message\nscriptSig: %s\nscriptPubKey: %s\n",scriptSig.ToString().c_str(),scriptPubKey.ToString().c_str());
return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
}
}