Merge pull request 'reset, revert difficulty algorithm, set fork height' (#374) from wowario/wownero:diff2 into dev-v0.10

Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/374
This commit is contained in:
wowario
2021-06-14 18:01:25 +00:00
5 changed files with 9 additions and 4 deletions
+1
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());