aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorlucash-dev <lucash.dev@gmail.com>2018-06-24 18:11:41 -0700
committerlucash-dev <lucash.dev@gmail.com>2020-10-15 13:45:30 -0700
commitc3e111a7daf5800026dda4455c737de0412528f1 (patch)
tree44597b1f1511f941206751b7ec915b457ac44ff8 /src/script/interpreter.h
parent9ad7cd2887abf5f91495337a2458560de10b4f69 (diff)
downloadbitcoin-c3e111a7daf5800026dda4455c737de0412528f1.tar.xz
Reduced number of validations in `tx_validationcache_tests` to keep the run time reasonable.
Following a suggestion in the comments, changed `ValidateCheckInputsForAllFlags` from testing all possible flag combinations to testing a random subset. Also created a new enum constant for the highest flag, so that this test doesn’t keep testing an incomplete subset in case a new flag is added.
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index c0c2b012c6..db4ebc49da 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -139,6 +139,10 @@ enum
// Making unknown public key versions (in BIP 342 scripts) non-standard
SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_PUBKEYTYPE = (1U << 20),
+
+ // Constants to point to the highest flag in use. Add new flags above this line.
+ //
+ SCRIPT_VERIFY_END_MARKER
};
bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror);