Merge pull request #7276

7ef8f3c Report non-mandatory script failures correctly (Pieter Wuille)
This commit is contained in:
Wladimir J. van der Laan 2016-01-04 09:10:25 +01:00
commit d032b5b64b
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -1653,9 +1653,9 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
// arguments; if so, don't trigger DoS protection to // arguments; if so, don't trigger DoS protection to
// avoid splitting the network between upgraded and // avoid splitting the network between upgraded and
// non-upgraded nodes. // non-upgraded nodes.
CScriptCheck check(*coins, tx, i, CScriptCheck check2(*coins, tx, i,
flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore); flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore);
if (check()) if (check2())
return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError()))); return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError())));
} }
// Failures of other flags indicate a transaction that is // Failures of other flags indicate a transaction that is