diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-07-24 10:36:54 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-07-24 10:36:58 +0200 |
commit | fd557ceb885ec55ac6865953e7325bcebc5a6972 (patch) | |
tree | f1cd6cb6ecb136170ed3caa90033eaceeba86496 /src/script | |
parent | 2b5563bb1e6819bf46f561d94213d5fb32751359 (diff) | |
parent | c3e111a7daf5800026dda4455c737de0412528f1 (diff) |
Merge bitcoin/bitcoin#13533: [tests] Reduced number of validations in tx_validationcache_tests
c3e111a7daf5800026dda4455c737de0412528f1 Reduced number of validations in `tx_validationcache_tests` to keep the run time reasonable. (lucash-dev)
Pull request description:
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.
Timing for `checkinputs_test`:
```
Before: 6.8s
After: 3.7s
----------------
Saved: 3.1s (45%)
```
This PR was split from #13050. Also see #10026.
ACKs for top commit:
leonardojobim:
tACK https://github.com/bitcoin/bitcoin/pull/13533/commits/c3e111a7daf5800026dda4455c737de0412528f1.
kallewoof:
ACK c3e111a7daf5800026dda4455c737de0412528f1
theStack:
re-ACK c3e111a7daf5800026dda4455c737de0412528f1
Tree-SHA512: bef49645bdd4f61ec73cc77a9f028b95d9856db9446d2e7fc9a48867a6f0e94c2c9f150cb771a30fe852db0efb0a1bd15d38b00d712651793ccb59ff6157a7b4
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/interpreter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 37ae713996..93136a0b79 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -139,6 +139,10 @@ enum : uint32_t { // 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); |