Don't pass nHashType to VerifyScript

This commit is contained in:
jtimon
2014-07-18 17:48:00 +02:00
committed by Pieter Wuille
parent ce3649fb61
commit 2b23a87599
10 changed files with 36 additions and 37 deletions

View File

@@ -1006,15 +1006,14 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubK
return true;
}
bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
unsigned int flags, int nHashType)
bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
{
vector<vector<unsigned char> > stack, stackCopy;
if (!EvalScript(stack, scriptSig, txTo, nIn, flags, nHashType))
if (!EvalScript(stack, scriptSig, txTo, nIn, flags, 0))
return false;
if (flags & SCRIPT_VERIFY_P2SH)
stackCopy = stack;
if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, nHashType))
if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, 0))
return false;
if (stack.empty())
return false;
@@ -1037,7 +1036,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
popstack(stackCopy);
if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, nHashType))
if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, 0))
return false;
if (stackCopy.empty())
return false;