diff options
Diffstat (limited to 'src/chain.h')
| -rw-r--r-- | src/chain.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/chain.h b/src/chain.h index 34879d576..ca10f4449 100644 --- a/src/chain.h +++ b/src/chain.h @@ -213,9 +213,6 @@ public: uint32_t nBits; uint32_t nNonce; - // Dogecoin: Keep the Scrypt hash as well as SHA256 - uint256 hashBlockPoW; - //! (memory only) Sequential id assigned to distinguish order in which blocks are received. int32_t nSequenceId; @@ -243,7 +240,6 @@ public: nTime = 0; nBits = 0; nNonce = 0; - hashBlockPoW = uint256(); } CBlockIndex() @@ -260,7 +256,6 @@ public: nTime = block.nTime; nBits = block.nBits; nNonce = block.nNonce; - hashBlockPoW = block.GetPoWHash(); } CDiskBlockPos GetBlockPos() const { @@ -281,29 +276,13 @@ public: return ret; } - CBlockHeader GetBlockHeader() const - { - CBlockHeader block; - block.nVersion = nVersion; - if (pprev) - block.hashPrevBlock = pprev->GetBlockHash(); - block.hashMerkleRoot = hashMerkleRoot; - block.nTime = nTime; - block.nBits = nBits; - block.nNonce = nNonce; - return block; - } + CBlockHeader GetBlockHeader(const Consensus::Params& consensusParams) const; uint256 GetBlockHash() const { return *phashBlock; } - uint256 GetBlockPoWHash() const - { - return hashBlockPoW; - } - int64_t GetBlockTime() const { return (int64_t)nTime; @@ -367,6 +346,13 @@ public: //! Efficiently find an ancestor of this block. CBlockIndex* GetAncestor(int height); const CBlockIndex* GetAncestor(int height) const; + + /* Analyse the block version. */ + inline int GetBaseVersion() const + { + return CPureBlockHeader::GetBaseVersion(nVersion); + } + }; arith_uint256 GetBlockProof(const CBlockIndex& block); @@ -415,7 +401,6 @@ public: READWRITE(nTime); READWRITE(nBits); READWRITE(nNonce); - READWRITE(hashBlockPoW); } uint256 GetBlockHash() const |