]> Git Repo - VerusCoin.git/blobdiff - src/chain.h
Cleanup nonce changes
[VerusCoin.git] / src / chain.h
index 3b8bbd9bde5ef6576ccb5981e579fd2334ab2d82..15036325ad1f255f6c71a0609620fb00a39e9acd 100644 (file)
@@ -177,7 +177,6 @@ public:
 
     //! (memory only) Sequential id assigned to distinguish order in which blocks are received.
     uint32_t nSequenceId;
-    int8_t notaryid; uint8_t pubkey33[33],didinit;
     
     void SetNull()
     {
@@ -322,6 +321,16 @@ public:
     //! Efficiently find an ancestor of this block.
     CBlockIndex* GetAncestor(int height);
     const CBlockIndex* GetAncestor(int height) const;
+
+    int32_t GetVerusPOSTarget() const
+    {
+        return GetBlockHeader().GetVerusPOSTarget();
+    }
+
+    bool IsVerusPOSBlock() const
+    {
+        return GetBlockHeader().IsVerusPOSBlock();
+    }
 };
 
 /** Used to marshal pointers into hashes for db storage. */
@@ -415,6 +424,7 @@ public:
 class CChain {
 private:
     std::vector<CBlockIndex*> vChain;
+    CBlockIndex *lastTip;
 
 public:
     /** Returns the index entry for the genesis block of this chain, or NULL if none. */
@@ -427,6 +437,11 @@ public:
         return vChain.size() > 0 ? vChain[vChain.size() - 1] : NULL;
     }
 
+    /** Returns the last tip of the chain, or NULL if none. */
+    CBlockIndex *LastTip() const {
+        return vChain.size() > 0 ? lastTip : NULL;
+    }
+
     /** Returns the index entry at a particular height in this chain, or NULL if no such height exists. */
     CBlockIndex *operator[](int nHeight) const {
         if (nHeight < 0 || nHeight >= (int)vChain.size())
This page took 0.030721 seconds and 4 git commands to generate.