-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
Description
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 CChainState
s to share the same mutable static local variables.
In CChainState::FlushStateToDisk
:
Lines 2154 to 2155 in 82bc7fa
static std::chrono::microseconds nLastWrite{0}; | |
static std::chrono::microseconds nLastFlush{0}; |
In CChainState::LoadExternalBlockFile
(this is fixed by #20331):
Line 4286 in 82bc7fa
static std::multimap<uint256, FlatFilePos> mapBlocksUnknownParent; |
ping @jamesob
Now that I think about it... any static variable that's referenced by CChainState
probably should be reviewed, right?
practicalswift, jamesob, darosior and theStack