aboutsummaryrefslogtreecommitdiff
path: root/src/test/txvalidationcache_tests.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-06-30 22:56:34 -0400
committerCarl Dong <contact@carldong.me>2022-08-03 12:02:31 -0400
commit0dbce4b1034b53d19b88af332385a006098b6d48 (patch)
tree2318c1bef31e97dfd2e559e22c8b23262127ffe8 /src/test/txvalidationcache_tests.cpp
parent4a4289e2c98cfbc51b05716f21065838afed80f6 (diff)
downloadbitcoin-0dbce4b1034b53d19b88af332385a006098b6d48.tar.xz
tests: Reduce calls to InitS*Cache()
In src/test/fuzz/script_sigcache.cpp, we should really be setting up a full working BasicTestingSetup. The initialize_ function is only run once anyway. In src/test/txvalidationcache_tests.cpp, the Dersig100Setup inherits from BasicTestingSetup, which should have already set up a global script execution cache without the need to explicitly call InitScriptExecutionCache.
Diffstat (limited to 'src/test/txvalidationcache_tests.cpp')
-rw-r--r--src/test/txvalidationcache_tests.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp
index dd4bc5af75..633f75ff4f 100644
--- a/src/test/txvalidationcache_tests.cpp
+++ b/src/test/txvalidationcache_tests.cpp
@@ -161,11 +161,6 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
{
// Test that passing CheckInputScripts with one set of script flags doesn't imply
// that we would pass again with a different set of flags.
- {
- LOCK(cs_main);
- InitScriptExecutionCache();
- }
-
CScript p2pk_scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
CScript p2sh_scriptPubKey = GetScriptForDestination(ScriptHash(p2pk_scriptPubKey));
CScript p2pkh_scriptPubKey = GetScriptForDestination(PKHash(coinbaseKey.GetPubKey()));