Browse Source

Merge pull request #2054 from LefterisJP/guard_mfulls_on_eval

Mutex guard m_fulls on eval()
cl-refactor
Gav Wood 10 years ago
parent
commit
11fe81ffde
  1. 5
      libethcore/EthashAux.cpp

5
libethcore/EthashAux.cpp

@ -240,8 +240,9 @@ Ethash::Result EthashAux::eval(BlockInfo const& _header, Nonce const& _nonce)
Ethash::Result EthashAux::eval(h256 const& _seedHash, h256 const& _headerHash, Nonce const& _nonce)
{
if (FullType dag = get()->m_fulls[_seedHash].lock())
return dag->compute(_headerHash, _nonce);
DEV_GUARDED(get()->x_fulls)
if (FullType dag = get()->m_fulls[_seedHash].lock())
return dag->compute(_headerHash, _nonce);
DEV_IF_THROWS(return EthashAux::get()->light(_seedHash)->compute(_headerHash, _nonce))
{
return Ethash::Result{ ~h256(), h256() };

Loading…
Cancel
Save