mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
versionbits: Use dedicated lock instead of cs_main
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#define BITCOIN_VERSIONBITS_H
|
||||
|
||||
#include <chain.h>
|
||||
#include <sync.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
/** What block version to use for new blocks (pre versionbits) */
|
||||
@@ -75,7 +77,8 @@ public:
|
||||
* keyed by the bit position used to signal support. */
|
||||
struct VersionBitsCache
|
||||
{
|
||||
ThresholdConditionCache caches[Consensus::MAX_VERSION_BITS_DEPLOYMENTS];
|
||||
Mutex mutex;
|
||||
ThresholdConditionCache caches[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] GUARDED_BY(mutex);
|
||||
|
||||
void Clear();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user