Commit 73f41361 authored by Ashot's avatar Ashot

Fixed condition

parent 72e144a1
Pipeline #860 passed with stage
in 15 minutes and 35 seconds
......@@ -147,8 +147,15 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
if (retarget == DIFF_BTC)
{
unsigned int nProofOfWorkLimit = Params().ProofOfWorkLimit().GetCompact();
if (pindexLast->nHeight >= 140394 && Params().NetworkID() == CBaseChainParams::TESTNET)
return nProofOfWorkLimit;
if (Params().NetworkID() == CBaseChainParams::TESTNET)
{
if (pindexLast->nHeight >= 140394)
{
return nProofOfWorkLimit;
}
// Before 140394 block difficulty was the same as mainnet
nProofOfWorkLimit = Params(CBaseChainParams::MAIN).ProofOfWorkLimit().GetCompact();
}
// Genesis block
if (pindexLast == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment