DonateStrategy now use FailoverStrategy internally and possible to use any other IStrategy.
This commit is contained in:
parent
c46c019c83
commit
1cf1d616c6
13 changed files with 73 additions and 47 deletions
|
@ -4,8 +4,8 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2017 XMRig <support@xmrig.com>
|
||||
*
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2017 XMRig <support@xmrig.com>
|
||||
*
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -83,10 +83,14 @@ void Workers::setEnabled(bool enabled)
|
|||
}
|
||||
|
||||
|
||||
void Workers::setJob(const Job &job)
|
||||
void Workers::setJob(const Job &job, bool donate)
|
||||
{
|
||||
uv_rwlock_wrlock(&m_rwlock);
|
||||
m_job = job;
|
||||
|
||||
if (donate) {
|
||||
m_job.setPoolId(-1);
|
||||
}
|
||||
uv_rwlock_wrunlock(&m_rwlock);
|
||||
|
||||
m_active = true;
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
static Job job();
|
||||
static void printHashrate(bool detail);
|
||||
static void setEnabled(bool enabled);
|
||||
static void setJob(const Job &job);
|
||||
static void setJob(const Job &job, bool donate);
|
||||
static void start(int64_t affinity, int priority);
|
||||
static void stop();
|
||||
static void submit(const JobResult &result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue