112 explicit operator bool()
const {
return m_timestamp >= 0; }
118 m_author == _cmp.
author() &&
124 m_number == _cmp.
number() &&
147 void setRoots(
h256 const& _t,
h256 const& _r,
h256 const& _u,
h256 const& _s) { m_transactionsRoot = _t; m_receiptsRoot = _r; m_stateRoot = _s; m_sha3Uncles = _u;
noteDirty(); }
154 template <
class T>
void setSeal(
unsigned _offset, T
const& _value) {
Guard l(m_sealLock);
if (m_seal.size() <= _offset) m_seal.resize(_offset + 1); m_seal[_offset] =
rlp(_value);
noteDirty(); }
166 int64_t
number()
const {
return m_number; }
171 template <
class T> T
seal(
unsigned _offset = 0)
const { T ret;
Guard l(m_sealLock);
if (_offset < m_seal.size()) ret =
RLP(m_seal[_offset]).
convert<T>(
RLP::VeryStrict);
return ret; }
174 void populate(
RLP const& _header);
175 void streamRLPFields(
RLPStream& _s)
const;
176 std::vector<bytes> seal()
const
181 h256 hashRawRead()
const
186 h256 hashWithoutRawRead()
const
189 return m_hashWithout;
195 h256 m_transactionsRoot;
198 int64_t m_number = 0;
202 int64_t m_timestamp = -1;
207 std::vector<bytes> m_seal;
208 mutable Mutex m_sealLock;
211 mutable h256 m_hashWithout;
212 mutable Mutex m_hashLock;