HomePhabricator

kernel: De-globalize signature cache

Description

kernel: De-globalize signature cache

Summary:
Move its ownership to the ChainstateManager class.

Next to simplifying usage of the kernel library by no longer requiring
manual setup of the cache prior to using validation code, it also slims
down the amount of memory allocated by BasicTestingSetup.

Use this opportunity to make SignatureCache RAII styled

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>

This concludes backport of core#30141
https://github.com/bitcoin/bitcoin/pull/30141/commits/606a7ab862470413ced400aa68a94fd37c8ad3d3
Depends on D18859

Test Plan: ninja all check-all bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
TheCharlatan <seb.kung@gmail.com>Authored on May 18 2024, 09:18
PiRKCommitted on Mon, Nov 3, 09:25
PiRKPushed on Mon, Nov 3, 09:25
Reviewer
Restricted Project
Differential Revision
D18860: kernel: De-globalize signature cache
Parents
rABC2a0800e3e55b: Expose CSignatureCache class in header
Branches
Unknown
Tags
Unknown