//! (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()
{
//! 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. */
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. */
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())