Browse Source

Merge branch 'develop' of github.com:ethereum/cpp-ethereum into develop

cl-refactor
Gav Wood 10 years ago
parent
commit
88a428beb6
  1. 8
      libethereum/Client.cpp
  2. 2
      libethereum/Client.h

8
libethereum/Client.cpp

@ -461,6 +461,14 @@ void Client::setShouldPrecomputeDAG(bool _precompute)
sealEngine()->setOption("precomputeDAG", _precompute ? trueBytes: falseBytes); sealEngine()->setOption("precomputeDAG", _precompute ? trueBytes: falseBytes);
} }
void Client::setTurboMining(bool _enable)
{
m_turboMining = _enable;
sealEngine()->setSealer("opencl");
if (isMining())
startMining();
}
bool Client::isMining() const bool Client::isMining() const
{ {
return Ethash::isWorking(m_sealEngine.get()); return Ethash::isWorking(m_sealEngine.get());

2
libethereum/Client.h

@ -135,7 +135,7 @@ public:
/// Are we allowed to GPU mine? /// Are we allowed to GPU mine?
bool turboMining() const { return m_turboMining; } bool turboMining() const { return m_turboMining; }
/// Enable/disable GPU mining. /// Enable/disable GPU mining.
void setTurboMining(bool _enable = true) { m_turboMining = _enable; if (isMining()) startMining(); } void setTurboMining(bool _enable = true);
/// Enable/disable precomputing of the DAG for next epoch /// Enable/disable precomputing of the DAG for next epoch
void setShouldPrecomputeDAG(bool _precompute); void setShouldPrecomputeDAG(bool _precompute);

Loading…
Cancel
Save