Set testnet fork time

merge-mining
SChernykh 2024-06-05 19:08:14 +02:00
parent a188ca7fad
commit b92eedeed7
2 changed files with 13 additions and 3 deletions

View File

@ -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
}

View File

@ -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<uint64_t>::max();
// Jun 09 2024 20:00:00 GMT+0000
static constexpr uint64_t MERGE_MINING_TESTNET_FORK_TIME = 1717963200;
struct DifficultyData
{