mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 08:17:55 +00:00
Don't limit min difficulty on testnet
This commit is contained in:
parent
f206e4b334
commit
fe5e209eb1
1 changed files with 8 additions and 6 deletions
|
@ -2018,7 +2018,7 @@ bool SideChain::load_config(const std::string& filename)
|
|||
parseValue(doc, "block_time", m_targetBlockTime);
|
||||
|
||||
uint64_t min_diff;
|
||||
if (parseValue(doc, "min_diff", min_diff)) {
|
||||
if (parseValue(doc, "min_diff", min_diff) && min_diff) {
|
||||
m_minDifficulty = { min_diff, 0 };
|
||||
}
|
||||
|
||||
|
@ -2050,6 +2050,7 @@ bool SideChain::check_config() const
|
|||
return false;
|
||||
}
|
||||
|
||||
if (s_networkType == NetworkType::Mainnet) {
|
||||
const difficulty_type min_diff{ MIN_DIFFICULTY, 0 };
|
||||
const difficulty_type max_diff{ 1000000000, 0 };
|
||||
|
||||
|
@ -2057,6 +2058,7 @@ bool SideChain::check_config() const
|
|||
LOGERR(1, "min_diff is invalid (must be between " << min_diff << " and " << max_diff << ')');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_chainWindowSize < 60) || (m_chainWindowSize > 2160)) {
|
||||
LOGERR(1, "pplns_window is invalid (must be between 60 and 2160)");
|
||||
|
|
Loading…
Reference in a new issue