From d2554341b1e834974bf99283dd00ebe6d0b72980 Mon Sep 17 00:00:00 2001 From: wowario Date: Wed, 24 Oct 2018 13:03:02 +0300 Subject: [PATCH] difficulty: remove testnet variables --- src/cryptonote_basic/difficulty.cpp | 11 ++--------- src/cryptonote_config.h | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/cryptonote_basic/difficulty.cpp b/src/cryptonote_basic/difficulty.cpp index 5ec281d35..796bd5a7f 100644 --- a/src/cryptonote_basic/difficulty.cpp +++ b/src/cryptonote_basic/difficulty.cpp @@ -256,14 +256,10 @@ namespace cryptonote { assert(timestamps.size() == cumulative_difficulties.size() && timestamps.size() <= static_cast(N+1) ); - if ( cryptonote::MAINNET && height <= DIFFICULTY_HEIGHT ){ + if ( height <= DIFFICULTY_HEIGHT ){ return static_cast(DIFFICULTY_GUESS); } - if ( cryptonote::TESTNET && height <= DIFFICULTY_TESTNET_HEIGHT ){ - return static_cast(DIFFICULTY_TESTNET_GUESS); - } - for ( int64_t i = 1; i <= N; i++ ) { ST = static_cast(timestamps[i]) - static_cast(timestamps[i-1]); ST = std::max(-4*T, std::min(ST, 6*T)); @@ -281,12 +277,9 @@ namespace cryptonote { next_D = std::max(next_D,(prev_D*108)/100); } - if ( cryptonote::MAINNET && next_D < DIFFICULTY_MINIMUM ) { + if ( next_D < DIFFICULTY_MINIMUM ) { return static_cast(DIFFICULTY_MINIMUM); } - else if ( cryptonote::TESTNET && next_D < DIFFICULTY_TESTNET_MINIMUM ) { - return static_cast(DIFFICULTY_TESTNET_MINIMUM); - } else { return static_cast(next_D); } diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 82408aab3..9d611b43d 100755 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -84,9 +84,6 @@ #define DIFFICULTY_HEIGHT 53666 // v9 fork height #define DIFFICULTY_GUESS 40000000 // difficulty at fork 40m #define DIFFICULTY_MINIMUM 25000000 // minimum difficulty set to 25m -#define DIFFICULTY_TESTNET_HEIGHT 100 -#define DIFFICULTY_TESTNET_GUESS 5069 -#define DIFFICULTY_TESTNET_MINIMUM 4069 #define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS_V1 DIFFICULTY_TARGET_V1 * CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS #define CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_SECONDS_V2 DIFFICULTY_TARGET_V2 * CRYPTONOTE_LOCKED_TX_ALLOWED_DELTA_BLOCKS