From eaa511440f7e97a8ec91b7a7e027fe02eccf9671 Mon Sep 17 00:00:00 2001 From: wowario Date: Sun, 13 Jun 2021 18:42:36 +0300 Subject: [PATCH] set testnet --- src/cryptonote_basic/difficulty.cpp | 1 + src/hardforks/hardforks.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/cryptonote_basic/difficulty.cpp b/src/cryptonote_basic/difficulty.cpp index 8349548d4..416816592 100644 --- a/src/cryptonote_basic/difficulty.cpp +++ b/src/cryptonote_basic/difficulty.cpp @@ -216,6 +216,7 @@ namespace cryptonote { return 1; } if (HEIGHT < 200 && HEIGHT > 2 && m_nettype == TESTNET) { return 500; } + if (HEIGHT <= 55 + DIFFICULTY_WINDOW && HEIGHT >= 55 && m_nettype == TESTNET) { return 1337; } if (HEIGHT <= DIFFICULTY_RESET_HEIGHT + DIFFICULTY_WINDOW && HEIGHT >= DIFFICULTY_RESET_HEIGHT && m_nettype == MAINNET) { return DIFFICULTY_RESET_LEVEL; } static_assert(DIFFICULTY_WINDOW >= 2, "Window is too small"); assert(length <= DIFFICULTY_WINDOW); diff --git a/src/hardforks/hardforks.cpp b/src/hardforks/hardforks.cpp index 8bb5a4445..994a9a55f 100644 --- a/src/hardforks/hardforks.cpp +++ b/src/hardforks/hardforks.cpp @@ -49,6 +49,19 @@ const hardfork_t mainnet_hard_forks[] = { const size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainnet_hard_forks[0]); const hardfork_t testnet_hard_forks[] = { + { 7, 1, 0, 1519605000 }, + { 8, 5, 0, 1524214739 }, + { 9, 10, 0, 1538689773 }, + { 10, 15, 0, 1541700352 }, + { 11, 20, 0, 1549238400 }, + { 12, 25, 0, 1549318761 }, + { 13, 30, 0, 1559292691 }, + { 14, 35, 0, 1559292774 }, + { 15, 40, 0, 1573280497 }, + { 16, 45, 0, 1600576508 }, + { 17, 50, 0, 1600576524 }, + { 18, 55, 0, 1623598208 }, + { 19, 60, 0, 1623598227 }, }; const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]);