diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-17 13:19:58 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-17 13:44:22 +0200 |
commit | 438c7e4cd2179170aeadb4aa1c902ccd1256dee6 (patch) | |
tree | d040fe5263589ae9718839e17ac5b31c276cc8f5 /src/main.cpp | |
parent | 5b9d1e10a831b6413b0f6ed54017c9d42139282f (diff) | |
parent | 6dcfda2dc48bee2148acd571dce7d3f09608d7a2 (diff) |
Merge pull request #4555
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon)
2b23a87 Don't pass nHashType to VerifyScript (jtimon)
ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon)
358562b Remove unused function main:VerifySignature (jtimon)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp index 766553d948..6c1c7166a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -697,7 +697,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) // IsStandard() will have already returned false // and this method isn't called. vector<vector<unsigned char> > stack; - if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false, 0)) + if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false)) return false; if (whichType == TX_SCRIPTHASH) @@ -1367,16 +1367,11 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach bool CScriptCheck::operator()() const { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; - if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, nHashType)) + if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags)) return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString()); return true; } -bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType) -{ - return CScriptCheck(txFrom, txTo, nIn, flags, nHashType)(); -} - bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks) { if (!tx.IsCoinBase()) @@ -1445,7 +1440,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi assert(coins); // Verify signature - CScriptCheck check(*coins, tx, i, flags, 0); + CScriptCheck check(*coins, tx, i, flags); if (pvChecks) { pvChecks->push_back(CScriptCheck()); check.swap(pvChecks->back()); @@ -1458,7 +1453,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi // avoid splitting the network between upgraded and // non-upgraded nodes. CScriptCheck check(*coins, tx, i, - flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, 0); + flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS); if (check()) return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag"); } |