diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1152,17 +1152,22 @@ fSuccess = false; } } - } - // If the operation failed, we require that all - // signatures must be empty vector - if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL)) { + bool allsigsnull = true; for (int i = 0; i < nSigsCount; i++) { if (stacktop(-idxTopSig - i).size()) { - return set_error(serror, - ScriptError::SIG_NULLFAIL); + allsigsnull = false; + break; } } + + // If the operation failed, we may require that all + // signatures must be empty vector + if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL) && + !allsigsnull) { + return set_error(serror, + ScriptError::SIG_NULLFAIL); + } } // Clean up stack of all arguments