Merge pull request #49 from zcash/fix-static-asserts
Add a second string argument to each `static_assert`, in order to be compatible with C++11
This commit is contained in:
commit
afdb0207a5
|
@ -36,8 +36,10 @@ static const int64_t MAX_FUTURE_BLOCK_TIME_ADJUSTED = 2 * 60 * 60;
|
|||
*/
|
||||
static const int64_t TIMESTAMP_WINDOW = MAX_FUTURE_BLOCK_TIME_ADJUSTED + 60;
|
||||
|
||||
static_assert(MAX_FUTURE_BLOCK_TIME_ADJUSTED > MAX_FUTURE_BLOCK_TIME_MTP);
|
||||
static_assert(TIMESTAMP_WINDOW > MAX_FUTURE_BLOCK_TIME_ADJUSTED);
|
||||
static_assert(MAX_FUTURE_BLOCK_TIME_ADJUSTED > MAX_FUTURE_BLOCK_TIME_MTP,
|
||||
"MAX_FUTURE_BLOCK_TIME_ADJUSTED must be greater than MAX_FUTURE_BLOCK_TIME_MTP");
|
||||
static_assert(TIMESTAMP_WINDOW > MAX_FUTURE_BLOCK_TIME_ADJUSTED,
|
||||
"TIMESTAMP_WINDOW must be greater than MAX_FUTURE_BLOCK_TIME_ADJUSTED");
|
||||
|
||||
|
||||
class CBlockFileInfo
|
||||
|
|
|
@ -336,7 +336,8 @@ public:
|
|||
// <https://zips.z.cash/zip-0208#minimum-difficulty-blocks-on-the-test-network>
|
||||
// 7 times that is 52.5 minutes which is well within the limit imposed by the soft fork.
|
||||
|
||||
static_assert(6 * Consensus::POST_BLOSSOM_POW_TARGET_SPACING * 7 < MAX_FUTURE_BLOCK_TIME_MTP - 60);
|
||||
static_assert(6 * Consensus::POST_BLOSSOM_POW_TARGET_SPACING * 7 < MAX_FUTURE_BLOCK_TIME_MTP - 60,
|
||||
"MAX_FUTURE_BLOCK_TIME_MTP is too low given block target spacing");
|
||||
consensus.nFutureTimestampSoftForkHeight = consensus.vUpgrades[Consensus::UPGRADE_BLOSSOM].nActivationHeight + 6;
|
||||
|
||||
// The best chain should have at least this much work.
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
static const int64_t DEFAULT_MAX_TIME_ADJUSTMENT = 0;
|
||||
static const int64_t LIMIT_MAX_TIME_ADJUSTMENT = 25 * 60;
|
||||
|
||||
static_assert(LIMIT_MAX_TIME_ADJUSTMENT * 2 < MAX_FUTURE_BLOCK_TIME_MTP);
|
||||
static_assert(MAX_FUTURE_BLOCK_TIME_MTP + LIMIT_MAX_TIME_ADJUSTMENT < MAX_FUTURE_BLOCK_TIME_ADJUSTED);
|
||||
static_assert(LIMIT_MAX_TIME_ADJUSTMENT * 2 < MAX_FUTURE_BLOCK_TIME_MTP,
|
||||
"LIMIT_MAX_TIME_ADJUSTMENT is too high given MAX_FUTURE_BLOCK_TIME_MTP");
|
||||
static_assert(MAX_FUTURE_BLOCK_TIME_MTP + LIMIT_MAX_TIME_ADJUSTMENT < MAX_FUTURE_BLOCK_TIME_ADJUSTED,
|
||||
"LIMIT_MAX_TIME_ADJUSTMENT is too high given MAX_FUTURE_BLOCK_TIME_MTP and MAX_FUTURE_BLOCK_TIME_ADJUSTED");
|
||||
|
||||
class CNetAddr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue