Rename ScanMidstateWorker to KernelWorker, move kernel scanning to separate module.
[novacoin.git] / src / kernel_worker.h
1 #ifndef BITCOIN_HERNELWORKER_H
2 #define BITCOIN_HERNELWORKER_H
3
4 class KernelWorker
5 {
6 public:
7     KernelWorker()
8     { }
9     KernelWorker(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd);
10     void Do();
11     vector<std::pair<uint256,uint32_t> >& GetSolutions();
12
13 private:
14 #ifdef USE_ASM
15 #ifdef __x86_64__
16     // AVX2 CPUs: 8-way hashing.
17     void Do_8way();
18 #endif
19     // SSE2, Neon: 4-way hashing.
20     void Do_4way();
21 #endif
22     // One way hashing.
23     void Do_generic();
24
25     // Kernel solutions.
26     std::vector<std::pair<uint256,uint32_t> > solutions;
27
28     // Kernel metadaya
29     uint8_t *kernel;
30     uint32_t nBits;
31     uint32_t nInputTxTime;
32     CBigNum  bnValueIn;
33
34     // Interval boundaries.
35     uint32_t nIntervalBegin;
36     uint32_t nIntervalEnd;
37 };
38
39 #endif