mirror of
https://github.com/wownero/wownero.git
synced 2026-10-24 10:58:33 +02:00
difficulty: remove testnet variables
This commit is contained in:
@@ -256,14 +256,10 @@ namespace cryptonote {
|
||||
|
||||
assert(timestamps.size() == cumulative_difficulties.size() && timestamps.size() <= static_cast<uint64_t>(N+1) );
|
||||
|
||||
if ( cryptonote::MAINNET && height <= DIFFICULTY_HEIGHT ){
|
||||
if ( height <= DIFFICULTY_HEIGHT ){
|
||||
return static_cast<uint64_t>(DIFFICULTY_GUESS);
|
||||
}
|
||||
|
||||
if ( cryptonote::TESTNET && height <= DIFFICULTY_TESTNET_HEIGHT ){
|
||||
return static_cast<uint64_t>(DIFFICULTY_TESTNET_GUESS);
|
||||
}
|
||||
|
||||
for ( int64_t i = 1; i <= N; i++ ) {
|
||||
ST = static_cast<int64_t>(timestamps[i]) - static_cast<int64_t>(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<uint64_t>(DIFFICULTY_MINIMUM);
|
||||
}
|
||||
else if ( cryptonote::TESTNET && next_D < DIFFICULTY_TESTNET_MINIMUM ) {
|
||||
return static_cast<uint64_t>(DIFFICULTY_TESTNET_MINIMUM);
|
||||
}
|
||||
else {
|
||||
return static_cast<uint64_t>(next_D);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user