From b92eedeed74f78ac2766e8fdda091dbc133f3cf4 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:08:14 +0200 Subject: [PATCH] Set testnet fork time --- src/pool_block.cpp | 9 ++++++++- src/pool_block.h | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/pool_block.cpp b/src/pool_block.cpp index a2d6bff..c24dcc0 100644 --- a/src/pool_block.cpp +++ b/src/pool_block.cpp @@ -416,7 +416,14 @@ bool PoolBlock::merge_mining_enabled() const #ifdef P2POOL_UNIT_TESTS return false; #else - return (SideChain::network_type() != NetworkType::Mainnet) || (m_timestamp >= MERGE_MINING_FORK_TIME); + switch (SideChain::network_type()) { + case NetworkType::Mainnet: + return m_timestamp >= MERGE_MINING_FORK_TIME; + case NetworkType::Testnet: + return m_timestamp >= MERGE_MINING_TESTNET_FORK_TIME; + default: + return false; + } #endif } diff --git a/src/pool_block.h b/src/pool_block.h index 8322b0c..0361fce 100644 --- a/src/pool_block.h +++ b/src/pool_block.h @@ -60,8 +60,11 @@ static constexpr difficulty_type MAX_CUMULATIVE_DIFFICULTY{ 13019633956666736640 // 1000 years at 1 block/second. It should be enough for any normal use. static constexpr uint64_t MAX_SIDECHAIN_HEIGHT = 31556952000ULL; -// Jul 01 2024 00:00:00 GMT+0000 -static constexpr uint64_t MERGE_MINING_FORK_TIME = 1719792000; +// TBD +static constexpr uint64_t MERGE_MINING_FORK_TIME = std::numeric_limits::max(); + +// Jun 09 2024 20:00:00 GMT+0000 +static constexpr uint64_t MERGE_MINING_TESTNET_FORK_TIME = 1717963200; struct DifficultyData {