Increased version and changed donationstrategy again
This commit is contained in:
parent
edfd6605e1
commit
197034b5dd
4 changed files with 7 additions and 7 deletions
|
@ -33,7 +33,7 @@
|
||||||
* Percentage of your hashing power that you want to donate to the developer, can be 0 if you don't want to do that.
|
* Percentage of your hashing power that you want to donate to the developer, can be 0 if you don't want to do that.
|
||||||
* Example of how it works for the default setting of 1:
|
* Example of how it works for the default setting of 1:
|
||||||
* You miner will mine into your usual pool for 99 minutes, then switch to the developer's pool for 1 minute.
|
* You miner will mine into your usual pool for 99 minutes, then switch to the developer's pool for 1 minute.
|
||||||
* Since v1.5.2 start time randomized in range from 50 to 150 minutes minus donation time, to reduce peaks on donation
|
* Since v1.5.2 start time randomized in range from 30 to 60 minutes minus donation time, to reduce peaks on donation
|
||||||
* pool when restarting a bunch of miners.
|
* pool when restarting a bunch of miners.
|
||||||
* Switching is instant, and only happens after a successful connection, so you never loose any hashes.
|
* Switching is instant, and only happens after a successful connection, so you never loose any hashes.
|
||||||
*
|
*
|
||||||
|
|
|
@ -68,7 +68,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
|
||||||
m_timer.data = this;
|
m_timer.data = this;
|
||||||
uv_timer_init(uv_default_loop(), &m_timer);
|
uv_timer_init(uv_default_loop(), &m_timer);
|
||||||
|
|
||||||
idle(random(3000, 9000) * 1000 - m_donateTime);
|
idle(random(1500, 3600) * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,9 +125,9 @@ void DonateStrategy::onResultAccepted(Client *client, const SubmitResult &result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DonateStrategy::idle(int timeout)
|
void DonateStrategy::idle(uint64_t timeout)
|
||||||
{
|
{
|
||||||
uv_timer_start(&m_timer, DonateStrategy::onTimer, static_cast<uint64_t>(timeout), 0);
|
uv_timer_start(&m_timer, DonateStrategy::onTimer, timeout, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ protected:
|
||||||
void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override;
|
void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void idle(int timeout);
|
void idle(uint64_t timeout);
|
||||||
void suspend();
|
void suspend();
|
||||||
|
|
||||||
static void onTimer(uv_timer_t *handle);
|
static void onTimer(uv_timer_t *handle);
|
||||||
|
|
|
@ -36,14 +36,14 @@
|
||||||
#define APP_DESC "XMRigCC CPU miner"
|
#define APP_DESC "XMRigCC CPU miner"
|
||||||
#define APP_COPYRIGHT "Copyright (C) 2017- BenDr0id"
|
#define APP_COPYRIGHT "Copyright (C) 2017- BenDr0id"
|
||||||
#endif
|
#endif
|
||||||
#define APP_VERSION "1.5.1 (based on XMRig 2.4.5)"
|
#define APP_VERSION "1.5.2 (based on XMRig 2.4.5)"
|
||||||
#define APP_DOMAIN ""
|
#define APP_DOMAIN ""
|
||||||
#define APP_SITE "https://github.com/Bendr0id/xmrigCC"
|
#define APP_SITE "https://github.com/Bendr0id/xmrigCC"
|
||||||
#define APP_KIND "cpu"
|
#define APP_KIND "cpu"
|
||||||
|
|
||||||
#define APP_VER_MAJOR 1
|
#define APP_VER_MAJOR 1
|
||||||
#define APP_VER_MINOR 5
|
#define APP_VER_MINOR 5
|
||||||
#define APP_VER_BUILD 1
|
#define APP_VER_BUILD 2
|
||||||
#define APP_VER_REV 0
|
#define APP_VER_REV 0
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue