File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#include < uint256.h>
10
10
11
+ #include < array>
11
12
#include < chrono>
12
13
#include < limits>
13
14
#include < map>
@@ -104,7 +105,7 @@ struct Params {
104
105
*/
105
106
uint32_t nRuleChangeActivationThreshold;
106
107
uint32_t nMinerConfirmationWindow;
107
- BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS] ;
108
+ std::array< BIP9Deployment,MAX_VERSION_BITS_DEPLOYMENTS> vDeployments;
108
109
/* * Proof of work parameters */
109
110
uint256 powLimit;
110
111
bool fPowAllowMinDifficultyBlocks ;
Original file line number Diff line number Diff line change 8
8
9
9
#include < string_view>
10
10
11
- const struct VBDeploymentInfo VersionBitsDeploymentInfo[ Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = {
12
- {
13
- /* .name =*/ " testdummy" ,
14
- /* .gbt_force =*/ true ,
11
+ const std::array< VBDeploymentInfo, Consensus::MAX_VERSION_BITS_DEPLOYMENTS> VersionBitsDeploymentInfo {
12
+ VBDeploymentInfo {
13
+ .name = " testdummy" ,
14
+ .gbt_force = true ,
15
15
},
16
- {
17
- /* .name =*/ " taproot" ,
18
- /* .gbt_force =*/ true ,
16
+ VBDeploymentInfo {
17
+ .name = " taproot" ,
18
+ .gbt_force = true ,
19
19
},
20
20
};
21
21
Original file line number Diff line number Diff line change 7
7
8
8
#include < consensus/params.h>
9
9
10
+ #include < array>
10
11
#include < optional>
11
12
#include < string>
12
13
@@ -17,7 +18,7 @@ struct VBDeploymentInfo {
17
18
bool gbt_force;
18
19
};
19
20
20
- extern const VBDeploymentInfo VersionBitsDeploymentInfo[ Consensus::MAX_VERSION_BITS_DEPLOYMENTS] ;
21
+ extern const std::array< VBDeploymentInfo, Consensus::MAX_VERSION_BITS_DEPLOYMENTS> VersionBitsDeploymentInfo ;
21
22
22
23
std::string DeploymentName (Consensus::BuriedDeployment dep);
23
24
Original file line number Diff line number Diff line change 8
8
#include < chain.h>
9
9
#include < sync.h>
10
10
11
+ #include < array>
11
12
#include < map>
12
13
13
14
/* * What block version to use for new blocks (pre versionbits) */
@@ -81,7 +82,7 @@ class VersionBitsCache
81
82
{
82
83
private:
83
84
Mutex m_mutex;
84
- ThresholdConditionCache m_caches[ Consensus::MAX_VERSION_BITS_DEPLOYMENTS] GUARDED_BY(m_mutex);
85
+ std::array< ThresholdConditionCache, Consensus::MAX_VERSION_BITS_DEPLOYMENTS> m_caches GUARDED_BY (m_mutex);
85
86
86
87
public:
87
88
/* * Get the numerical statistics for a given deployment for the signalling period that includes pindex.
You can’t perform that action at this time.
0 commit comments