HomePhabricator

Make static nLastFlush and nLastWrite Chainstate members

Description

Make static nLastFlush and nLastWrite Chainstate members

Summary:

Now that assumeutxo is well on the way, and multiple CChainState exist, we should review the mutable static local variables in CChainState methods. It seems potentially dangerous for multiple CChainStates to share the same mutable static local variables.

ref T3378

This is a backport of core#26513
Depends on D15001

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Maniphest Tasks: T3378

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

Details

Provenance
Aurèle Oulès <aurele@oules.com>Authored on Nov 16 2022, 15:51
PiRKCommitted on Dec 18 2023, 14:30
PiRKPushed on Dec 18 2023, 14:30
Reviewer
Restricted Project
Differential Revision
D15002: Make static nLastFlush and nLastWrite Chainstate members
Parents
rABC9225846943a3: refactor: Make mapBlocksUnknownParent local, and rename it
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline