Auto merge of #3077 - str4d:asan-initialization-order-fiasco, r=str4d
Split declaration and definition of SPROUT_BRANCH_ID constant Fixes an initialization-order-fiasco error detected by ASan: https://ci.z.cash/#/builders/7/builds/149
This commit is contained in:
@@ -26,6 +26,8 @@ const struct NUInfo NetworkUpgradeInfo[Consensus::MAX_NETWORK_UPGRADES] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint32_t SPROUT_BRANCH_ID = NetworkUpgradeInfo[Consensus::BASE_SPROUT].nBranchId;
|
||||||
|
|
||||||
UpgradeState NetworkUpgradeState(
|
UpgradeState NetworkUpgradeState(
|
||||||
int nHeight,
|
int nHeight,
|
||||||
const Consensus::Params& params,
|
const Consensus::Params& params,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ struct NUInfo {
|
|||||||
extern const struct NUInfo NetworkUpgradeInfo[];
|
extern const struct NUInfo NetworkUpgradeInfo[];
|
||||||
|
|
||||||
// Consensus branch id to identify pre-overwinter (Sprout) consensus rules.
|
// Consensus branch id to identify pre-overwinter (Sprout) consensus rules.
|
||||||
static const uint32_t SPROUT_BRANCH_ID = NetworkUpgradeInfo[Consensus::BASE_SPROUT].nBranchId;
|
extern const uint32_t SPROUT_BRANCH_ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the state of a given network upgrade based on block height.
|
* Checks the state of a given network upgrade based on block height.
|
||||||
|
|||||||
Reference in New Issue
Block a user