Page MenuHomePhabricator

tests: Reduce calls to InitS*Cache()
ClosedPublic

Authored by PiRK on Mar 19 2024, 12:31.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC06fe55382386: tests: Reduce calls to InitS*Cache()
Summary

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, TestChain100Setup inherits
from BasicTestingSetup, which already sets up a global script
execution cache without the need to explicitly call
InitScriptExecutionCache.

This is a partial backport of core#25527
https://github.com/bitcoin/bitcoin/pull/25527/commits/0dbce4b1034b53d19b88af332385a006098b6d48

Depends on D15733

Test Plan

ninja check bitcoin-fuzzers