Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
- index ae42b2bd7..038ae6693 100644
- --- a/src/policy/policy.cpp
- +++ b/src/policy/policy.cpp
- @@ -133,19 +133,26 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
- txnouttype whichType;
- // get the scriptPubKey corresponding to this input:
- const CScript& prevScript = prev.scriptPubKey;
- - if (!Solver(prevScript, whichType, vSolutions))
- + if (!Solver(prevScript, whichType, vSolutions)) {
- + LogPrintf("AreInputsStandard fails at prev.scriptPubKey at input %d: %s\n", i, HexStr(prev.scriptPubKey));
- return false;
- + }
- if (whichType == TX_SCRIPTHASH)
- {
- std::vector<std::vector<unsigned char> > stack;
- // convert the scriptSig into a stack, so we can inspect the redeemScript
- - if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SIGVERSION_BASE))
- + if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SIGVERSION_BASE)) {
- + LogPrintf("AreInputsStandard fails at EvalScript(stack, tx.vin[%d].scriptSig)\n", i);
- return false;
- - if (stack.empty())
- + }
- + if (stack.empty()) {
- + LogPrintf("AreInputsStandard fails at stack empty at index %d\n", i);
- return false;
- + }
- CScript subscript(stack.back().begin(), stack.back().end());
- if (subscript.GetSigOpCount(true) > MAX_P2SH_SIGOPS) {
- + LogPrintf("AreInputsStandard fails at MAX_P2SH_SIGOPS at index %d\n", i);
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement