Reorganize includes a bit
[novacoin.git] / src / kernel_worker.h
index faf5f06..bea8aa6 100644 (file)
@@ -3,36 +3,37 @@
 
 #include <vector>
 
-using namespace std;
+#include "bignum.h"
+
 
 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<pair<uint256,uint32_t> >& GetSolutions();
+    std::vector<std::pair<uint256,uint32_t> >& GetSolutions();
 
 private:
     // One way hashing.
     void Do_generic();
 
     // Kernel solutions.
-    vector<pair<uint256,uint32_t> > solutions;
+    std::vector<std::pair<uint256,uint32_t> > solutions;
 
     // Kernel metadata.
-    uint8_t *kernel;
-    uint32_t nBits;
-    uint32_t nInputTxTime;
-    CBigNum  bnValueIn;
+    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<uint32_t, uint32_t> &SearchInterval, pair<uint256, uint32_t> &solution);
+bool ScanKernelBackward(uint8_t *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair<uint32_t, uint32_t> &SearchInterval, std::pair<uint256, uint32_t> &solution);
 
 #endif // NOVACOIN_KERNELWORKER_H