Minor optimization in PoS kernel: call scrypt_blockhash once time instead of multiple...
[novacoin.git] / src / main.h
index 3711793..0ed1777 100644 (file)
@@ -856,6 +856,7 @@ public:
 
     // memory only
     mutable std::vector<uint256> vMerkleTree;
+    uint256 hashBlock;
 
     // Denial-of-service detection:
     mutable int nDoS;
@@ -901,6 +902,7 @@ public:
         vchBlockSig.clear();
         vMerkleTree.clear();
         nDoS = 0;
+        hashBlock = 0;
     }
 
     bool IsNull() const
@@ -908,7 +910,7 @@ public:
         return (nBits == 0);
     }
 
-    uint256 GetHash() const
+    uint256 GetHash(bool fRehash=false) const
     {
         return scrypt_blockhash(CVOIDBEGIN(nVersion));
     }