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