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 {