X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fkernel.cpp;h=b18ae2b7c180f836f687b46f019c134ba17cd513;hp=ea2b43e91c0f879f1ef97c5d0818f22cdf9b7b6c;hb=89d4073d0a6545330af16bb8b2352881b6f55cf5;hpb=40a76f11c7056c53f71bfc60419ba7354016f55f diff --git a/src/kernel.cpp b/src/kernel.cpp index ea2b43e..b18ae2b 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -38,6 +38,7 @@ static std::map mapStakeModifierCheckpoints = (160000, 0x789df0f0u ) (200000, 0x01ec1503u ) (221047, 0x0b39ef50u ) + (243100, 0xe928d83au ) ; // Hard checkpoints of stake modifiers to ensure they are deterministic (testNet) @@ -434,9 +435,13 @@ bool ScanKernelForward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxT // TODO: custom threads amount uint32_t nThreads = boost::thread::hardware_concurrency(); + if (nThreads == 0) + { + nThreads = 1; + printf("Warning: hardware_concurrency() failed in %s:%d\n", __FILE__, __LINE__); + } uint32_t nPart = (SearchInterval.second - SearchInterval.first) / nThreads; - KernelWorker *workers = new KernelWorker[nThreads]; boost::thread_group group;