Update CMakeLists.txt - play with openssl
[novacoin.git] / src / kernel_worker.h
1 #ifndef NOVACOIN_KERNELWORKER_H
2 #define NOVACOIN_KERNELWORKER_H
3
4 #include "bignum.h"
5
6 #include <cstdint>
7 #include <vector>
8
9 class uint256;
10
11 class KernelWorker
12 {
13 public:
14     KernelWorker()
15     { }
16     KernelWorker(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd);
17     void Do();
18     std::vector<std::pair<uint256,uint32_t> >& GetSolutions();
19
20 private:
21     // One way hashing.
22     void Do_generic();
23
24     // Kernel solutions.
25     std::vector<std::pair<uint256,uint32_t> > solutions;
26
27     // Kernel metadata.
28     uint8_t *kernel;
29     uint32_t nBits;
30     uint32_t nInputTxTime;
31     CBigNum  bnValueIn;
32
33     // Interval boundaries.
34     uint32_t nIntervalBegin;
35     uint32_t nIntervalEnd;
36 };
37
38 // Scan given kernel for solutions
39 bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair<uint32_t, uint32_t> &SearchInterval, std::pair<uint256, uint32_t> &solution);
40
41 #endif // NOVACOIN_KERNELWORKER_H