Browse Source

Check if precompute seal option exists

plus indentation style fix
cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
69e8b01115
  1. 3
      libethcore/EthashSealEngine.cpp
  2. 4
      libethereum/Client.h

3
libethcore/EthashSealEngine.cpp

@ -54,7 +54,8 @@ void EthashSealEngine::generateSeal(BlockInfo const& _bi)
m_farm.setWork(m_sealing);
m_farm.start(m_sealer);
m_farm.setWork(m_sealing); // TODO: take out one before or one after...
if (option("precomputeDAG")[0] == 1)
bytes shouldPrecompute = option("precomputeDAG");
if (!shouldPrecompute.empty() && shouldPrecompute[0] == 1)
Ethash::ensurePrecomputed((unsigned)_bi.number());
}

4
libethereum/Client.h

@ -140,8 +140,8 @@ public:
bool turboMining() const { return m_turboMining; }
/// Enable/disable GPU mining.
void setTurboMining(bool _enable = true) { m_turboMining = _enable; if (isMining()) startMining(); }
/// Enable/disable precomputing of the DAG for next epoch
void setShouldPrecomputeDAG(bool _precompute);
/// Enable/disable precomputing of the DAG for next epoch
void setShouldPrecomputeDAG(bool _precompute);
/// Check to see if we'd mine on an apparently bad chain.
bool mineOnBadChain() const { return m_mineOnBadChain; }

Loading…
Cancel
Save