diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d426d765..008a7b7d 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -301,6 +301,9 @@ public: */ }; assert(vFoundersRewardAddress.size() <= consensus.GetLastFoundersRewardBlockHeight()); + + nForkStartHeight = 10; + nForkHeightRange = 300; } }; static CTestNetParams testNetParams; diff --git a/src/main.cpp b/src/main.cpp index da750e78..1de14bde 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1475,6 +1475,9 @@ bool IsInitialBlockDownload() return true; if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints())) return true; + if (chainActive.Height() < chainParams.ForkStartHeight() + chainParams.ForkHeightRange()) + return true; + static bool lockIBDState = false; if (lockIBDState) return false; diff --git a/src/miner.cpp b/src/miner.cpp index 15c07978..3f4c69f3 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -729,7 +729,7 @@ void static BitcoinMiner() LOCK(cs_vNodes); fvNodesEmpty = vNodes.empty(); } - if (!fvNodesEmpty) // && !IsInitialBlockDownload()) + if (!fvNodesEmpty && !IsInitialBlockDownload()) break; MilliSleep(1000); } while (true);