mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-15 07:03:40 +01:00
Merge pull request #4555
6dcfda2Don't pass nHashType to EvalScript nor CheckSig (jtimon)2b23a87Don't pass nHashType to VerifyScript (jtimon)ce3649fbRemove CScriptCheck::nHashType (was always 0) (jtimon)358562bRemove unused function main:VerifySignature (jtimon)
This commit is contained in:
@@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
|
||||
}
|
||||
|
||||
// Test solution
|
||||
return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
|
||||
return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS);
|
||||
}
|
||||
|
||||
bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
|
||||
@@ -174,7 +174,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
|
||||
if (sigs.count(pubkey))
|
||||
continue; // Already got a sig for this pubkey
|
||||
|
||||
if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0, 0))
|
||||
if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0))
|
||||
{
|
||||
sigs[pubkey] = sig;
|
||||
break;
|
||||
@@ -252,9 +252,9 @@ CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsign
|
||||
Solver(scriptPubKey, txType, vSolutions);
|
||||
|
||||
vector<valtype> stack1;
|
||||
EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
|
||||
EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
|
||||
vector<valtype> stack2;
|
||||
EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
|
||||
EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
|
||||
|
||||
return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user