aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-06-26 17:19:31 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-07-07 10:08:49 +0200
commit6ad0328f1c3e145d3224197eafd0f66b17cc1a1c (patch)
tree882c1e7bb5c90609063a05e642b4efb8cf2c1660 /src/script
parent0212187fc624ea4a02fc99bc57ebd413499a9ee1 (diff)
Don't assert(foo()) where foo has side effects
Diffstat (limited to 'src/script')
-rw-r--r--src/script/sign.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 60a8a2655d..541d90e78f 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -424,7 +424,8 @@ bool IsSolvable(const SigningProvider& provider, const CScript& script)
static_assert(STANDARD_SCRIPT_VERIFY_FLAGS & SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, "IsSolvable requires standard script flags to include WITNESS_PUBKEYTYPE");
if (ProduceSignature(provider, DUMMY_SIGNATURE_CREATOR, script, sigs)) {
// VerifyScript check is just defensive, and should never fail.
- assert(VerifyScript(sigs.scriptSig, script, &sigs.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, DUMMY_CHECKER));
+ bool verified = VerifyScript(sigs.scriptSig, script, &sigs.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, DUMMY_CHECKER);
+ assert(verified);
return true;
}
return false;