HomePhabricator

tests: Reduce calls to InitS*Cache()

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D15734

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Jul 1 2022, 02:56
PiRKCommitted on Mar 19 2024, 16:21
PiRKPushed on Mar 19 2024, 16:21
Reviewer
Restricted Project
Differential Revision
D15734: tests: Reduce calls to InitS*Cache()
Parents
rABC8c3a652ab918: [test] remove unneeded InitScriptExecutionCache
Branches
Unknown
Tags
Unknown