PPCoin: Separate proof-of-work and proof-of-stake blocks
[novacoin.git] / src / main.h
index cad0069..ea73a0f 100644 (file)
@@ -667,6 +667,7 @@ protected:
 public:
     bool RemoveFromMemoryPool();
     bool GetCoinAge(CTxDB& txdb, uint64& nCoinAge) const;  // ppcoin: get transaction coin age
+    bool CheckProofOfStake(CTxDB& txdb, unsigned int nBits) const;
 };
 
 
@@ -877,6 +878,17 @@ public:
         return (int64)nTime;
     }
 
+    // ppcoin: two types of block: proof-of-work or proof-of-stake
+    bool IsProofOfStake() const
+    {
+        return (vtx.size() > 1 && vtx[1].IsCoinStake());
+    }
+
+    bool IsProofOfWork() const
+    {
+        return !IsProofOfStake();
+    }
+
     // ppcoin: get max transaction timestamp
     int64 GetMaxTransactionTime() const
     {