Report non-mandatory script failures correctly

This commit is contained in:
Pieter Wuille 2016-01-03 16:50:31 +01:00 committed by Jack Grigg
parent 49274558c6
commit 838e7a29cc
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 2 additions and 2 deletions

View File

@ -1846,9 +1846,9 @@ bool ContextualCheckInputs(const CTransaction& tx, CValidationState &state, cons
// arguments; if so, don't trigger DoS protection to
// avoid splitting the network between upgraded and
// non-upgraded nodes.
CScriptCheck check(*coins, tx, i,
CScriptCheck check2(*coins, tx, i,
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())));
}
// Failures of other flags indicate a transaction that is