Skip to content

Commit

Permalink
WIP (#148) fix minimum nextDifficulty
Browse files Browse the repository at this point in the history
* fix minimum nextDifficulty

Co-authored-by: ExploShot <[email protected]>
  • Loading branch information
nnian and ExploShot authored Oct 3, 2020
1 parent bd4ccdc commit b231b97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/CryptoNoteCore/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,8 @@ difficulty_type Currency::nextDifficultyV2(
uint64_t nextDiffZ = low / timeSpan;

// minimum limit
if (!isTestnet() && nextDiffZ < 100) {
nextDiffZ = 100;
if (!isTestnet() && nextDiffZ < 100000) {
nextDiffZ = 100000;
}

return nextDiffZ;
Expand Down Expand Up @@ -918,8 +918,8 @@ difficulty_type Currency::nextDifficultyV3(
next_difficulty = static_cast<uint64_t>(nextDifficulty);

// minimum limit
if (!isTestnet() && next_difficulty < 1000) {
next_difficulty = 1000;
if (!isTestnet() && next_difficulty < 100000) {
next_difficulty = 100000;
}

return next_difficulty;
Expand Down Expand Up @@ -984,8 +984,8 @@ difficulty_type Currency::nextDifficultyV5(
}

// minimum limit
if (nextDiffV5 < 1000) {
nextDiffV5 = 1000;
if (nextDiffV5 < 10000000) {
nextDiffV5 = 10000000;
}
if(isTestnet()){
nextDiffV5 = 10000;
Expand Down
4 changes: 2 additions & 2 deletions lib/Global/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@"
#define APP_VER_MAJOR 6
#define APP_VER_MINOR 0
#define APP_VER_REV 1
#define APP_VER_BUILD 6067
#define APP_VER_REV 2
#define APP_VER_BUILD 6071

#define BUILD_COMMIT_ID "@PROJECT_GIT_COMMIT_ID@"
#define PROJECT_VERSION STR(APP_VER_MAJOR) "." STR(APP_VER_MINOR) "." STR(APP_VER_REV)
Expand Down

0 comments on commit b231b97

Please sign in to comment.