mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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.
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user