diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h index 4873933b3b8..61d201c1f54 100644 --- a/src/CryptoNoteConfig.h +++ b/src/CryptoNoteConfig.h @@ -25,12 +25,13 @@ namespace CryptoNote { namespace parameters { +const uint64_t DIFFICULTY_TARGET = 240; // seconds const uint64_t CRYPTONOTE_MAX_BLOCK_NUMBER = 500000000; const size_t CRYPTONOTE_MAX_BLOCK_BLOB_SIZE = 500000000; const size_t CRYPTONOTE_MAX_TX_SIZE = 1000000000; const uint64_t CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 111; // addresses start with "K" const size_t CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW = 10; -const uint64_t CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT = 60 * 60 * 2; +const uint64_t CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT = DIFFICULTY_TARGET * 7; const size_t BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW = 60; @@ -51,7 +52,6 @@ const size_t CRYPTONOTE_DISPLAY_DECIMAL_POINT = 12; const uint64_t MINIMUM_FEE = UINT64_C(100000000); const uint64_t DEFAULT_DUST_THRESHOLD = UINT64_C(0); -const uint64_t DIFFICULTY_TARGET = 240; // seconds const uint64_t EXPECTED_NUMBER_OF_BLOCKS_PER_DAY = 24 * 60 * 60 / DIFFICULTY_TARGET; const size_t DIFFICULTY_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks const size_t DIFFICULTY_WINDOW_V2 = 17; // blocks @@ -76,9 +76,9 @@ const size_t FUSION_TX_MIN_IN_OUT_COUNT_RATIO = 4; const uint32_t UPGRADE_HEIGHT_V2 = 60000; const uint32_t UPGRADE_HEIGHT_V3 = 4294967294; -const unsigned UPGRADE_VOTING_THRESHOLD = 90; // percent -const uint32_t UPGRADE_VOTING_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks -const uint32_t UPGRADE_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks +const unsigned UPGRADE_VOTING_THRESHOLD = 90; // percent +const uint32_t UPGRADE_VOTING_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks +const uint32_t UPGRADE_WINDOW = EXPECTED_NUMBER_OF_BLOCKS_PER_DAY; // blocks static_assert(0 < UPGRADE_VOTING_THRESHOLD && UPGRADE_VOTING_THRESHOLD <= 100, "Bad UPGRADE_VOTING_THRESHOLD"); static_assert(UPGRADE_VOTING_WINDOW > 1, "Bad UPGRADE_VOTING_WINDOW");