Make single thread bench cheat-resistant

Each hash is dependent on the previous hash to make multi-threaded cheating impossible.
This commit is contained in:
SChernykh
2020-11-15 20:38:27 +01:00
parent c3e7899704
commit 76c406ce63
11 changed files with 43 additions and 15 deletions

View File

@@ -481,7 +481,7 @@ void xmrig::CudaBackend::start(IWorker *worker, bool ready)
mutex.unlock();
if (ready) {
worker->start();
worker->start(d_ptr->controller->config());
}
}

View File

@@ -145,7 +145,7 @@ size_t xmrig::CudaWorker::intensity() const
}
void xmrig::CudaWorker::start()
void xmrig::CudaWorker::start(xmrig::Config*)
{
while (Nonce::sequence(Nonce::CUDA) > 0) {
if (!isReady()) {

View File

@@ -39,6 +39,7 @@ namespace xmrig {
class ICudaRunner;
class Config;
class CudaWorker : public Worker
@@ -58,7 +59,7 @@ public:
protected:
bool selfTest() override;
size_t intensity() const override;
void start() override;
void start(Config*) override;
private:
bool consumeJob();