Sync changes.

This commit is contained in:
XMRig 2019-02-08 16:55:21 +07:00
parent a6a0fb965a
commit 1a2aaf210c
10 changed files with 107 additions and 45 deletions

View file

@ -5,7 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.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>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 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
@ -44,7 +45,7 @@ class DonateStrategy : public IStrategy, public IStrategyListener
{
public:
DonateStrategy(int level, const char *user, xmrig::Algo algo, IStrategyListener *listener);
~DonateStrategy();
~DonateStrategy() override;
public:
inline bool isActive() const override { return m_active; }
@ -52,6 +53,7 @@ public:
int64_t submit(const JobResult &result) override;
void connect() override;
void setAlgo(const xmrig::Algorithm &algo) override;
void stop() override;
void tick(uint64_t now) override;
@ -68,11 +70,13 @@ private:
static void onTimer(uv_timer_t *handle);
bool m_active;
const int m_donateTime;
const int m_idleTime;
const uint64_t m_donateTime;
const uint64_t m_idleTime;
IStrategy *m_strategy;
IStrategyListener *m_listener;
std::vector<Pool> m_pools;
uint64_t m_now;
uint64_t m_stop;
uv_timer_t m_timer;
};