set testnet

This commit is contained in:
wowario 2021-06-13 18:42:36 +03:00
parent 03af4e871c
commit eaa511440f
2 changed files with 14 additions and 0 deletions

View File

@ -216,6 +216,7 @@ namespace cryptonote {
return 1; return 1;
} }
if (HEIGHT < 200 && HEIGHT > 2 && m_nettype == TESTNET) { return 500; } 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; } 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"); static_assert(DIFFICULTY_WINDOW >= 2, "Window is too small");
assert(length <= DIFFICULTY_WINDOW); assert(length <= DIFFICULTY_WINDOW);

View File

@ -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 size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainnet_hard_forks[0]);
const hardfork_t testnet_hard_forks[] = { 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]); const size_t num_testnet_hard_forks = sizeof(testnet_hard_forks) / sizeof(testnet_hard_forks[0]);