Browse Source

BlockHeader: Reorder some classes

cl-refactor
Paweł Bylica 8 years ago
parent
commit
00e2f8dda1
No known key found for this signature in database GPG Key ID: 7A0C037434FE77EF
  1. 38
      libethcore/BlockInfo.h

38
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>;
}

Loading…
Cancel
Save