X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fkernel_worker.h;h=38e8b05408ff40de69522fe1704758da0fdc25cf;hb=90fcea8a8ee743d9da20ebacbdcffa6155a4330c;hp=25e731a30e96775f426668dab317487b1a8b1ac6;hpb=259d6a2fbf09be0a77c46fc191f76b642eba152f;p=novacoin.git diff --git a/src/kernel_worker.h b/src/kernel_worker.h index 25e731a..38e8b05 100644 --- a/src/kernel_worker.h +++ b/src/kernel_worker.h @@ -1,38 +1,37 @@ -#ifndef BITCOIN_HERNELWORKER_H -#define BITCOIN_HERNELWORKER_H +#ifndef NOVACOIN_KERNELWORKER_H +#define NOVACOIN_KERNELWORKER_H #include -using namespace std; class KernelWorker { public: KernelWorker() { } - KernelWorker(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd); + KernelWorker(uint8_t *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd); void Do(); - vector >& GetSolutions(); + std::vector >& GetSolutions(); private: // One way hashing. void Do_generic(); // Kernel solutions. - vector > solutions; + std::vector > solutions; - // Kernel metadaya - uint8_t *kernel; - uint32_t nBits; - uint32_t nInputTxTime; - CBigNum bnValueIn; + // Kernel metadata. + uint8_t *kernel = nullptr; + uint32_t nBits = 0; + uint32_t nInputTxTime = 0; + CBigNum bnValueIn = 0; // Interval boundaries. - uint32_t nIntervalBegin; - uint32_t nIntervalEnd; + uint32_t nIntervalBegin = 0; + uint32_t nIntervalEnd = 0; }; // Scan given kernel for solutions -bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, pair &SearchInterval, pair &solution); +bool ScanKernelBackward(uint8_t *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair &SearchInterval, std::pair &solution); -#endif +#endif // NOVACOIN_KERNELWORKER_H