reset, revert difficulty algorithm, set fork height

This commit is contained in:
wowario
2021-05-24 21:53:45 +03:00
parent 707bfe86ad
commit 9cd125b345
5 changed files with 9 additions and 4 deletions

View File

@@ -216,6 +216,7 @@ namespace cryptonote {
return 1;
}
if (HEIGHT < 200 && HEIGHT > 2 && m_nettype == TESTNET) { return 500; }
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);
sort(timestamps.begin(), timestamps.end());