Paweł Bylica
8 years ago
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with
19 additions and
19 deletions
-
libethcore/BlockInfo.h
|
|
@ -153,6 +153,25 @@ private: |
|
|
|
mutable h256 m_boundary; ///< 2^256 / difficulty
|
|
|
|
}; |
|
|
|
|
|
|
|
class BlockHeaderRaw: public BlockInfo |
|
|
|
{ |
|
|
|
public: |
|
|
|
h256 const& seedHash() const; |
|
|
|
Nonce const& nonce() const { return m_nonce; } |
|
|
|
|
|
|
|
protected: |
|
|
|
BlockHeaderRaw() = default; |
|
|
|
BlockHeaderRaw(BlockInfo const& _bi): BlockInfo(_bi) {} |
|
|
|
|
|
|
|
void clear() { m_mixHash = h256(); m_nonce = Nonce(); } |
|
|
|
|
|
|
|
private: |
|
|
|
Nonce m_nonce; |
|
|
|
h256 m_mixHash; |
|
|
|
|
|
|
|
mutable h256 m_seedHash; |
|
|
|
}; |
|
|
|
|
|
|
|
template <class BlockInfoSub> |
|
|
|
class BlockHeaderPolished: public BlockInfoSub |
|
|
|
{ |
|
|
@ -211,25 +230,6 @@ public: |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
class BlockHeaderRaw: public BlockInfo |
|
|
|
{ |
|
|
|
public: |
|
|
|
h256 const& seedHash() const; |
|
|
|
Nonce const& nonce() const { return m_nonce; } |
|
|
|
|
|
|
|
protected: |
|
|
|
BlockHeaderRaw() = default; |
|
|
|
BlockHeaderRaw(BlockInfo const& _bi): BlockInfo(_bi) {} |
|
|
|
|
|
|
|
void clear() { m_mixHash = h256(); m_nonce = Nonce(); } |
|
|
|
|
|
|
|
private: |
|
|
|
Nonce m_nonce; |
|
|
|
h256 m_mixHash; |
|
|
|
|
|
|
|
mutable h256 m_seedHash; |
|
|
|
}; |
|
|
|
|
|
|
|
using BlockHeader = BlockHeaderPolished<BlockHeaderRaw>; |
|
|
|
|
|
|
|
} |
|
|
|