# 1.5.2 Preparation

- Fixed OSX Build- Fixed force PoW algo version 
- Added AEON test vectors for new PoW Algo
- Changed DonateStrategy to latest XMRig to avoid peaks on donate pool when restarting multiple miners
This commit is contained in:
BenDroid 2018-03-24 23:44:47 +01:00
parent 8b2424b97a
commit ac2980cea7
5 changed files with 21 additions and 9 deletions

View file

@ -4,7 +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 2017-2018 XMRig <support@xmrig.com>
* Copyright 2017- BenDr0id <ben@graef.in>
*
*
@ -32,6 +33,8 @@
* 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:
* 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
* pool when restarting a bunch of miners.
* Switching is instant, and only happens after a successful connection, so you never loose any hashes.
*
* If you plan on changing this setting to 0 please consider making a one off donation to my wallet:

View file

@ -4,7 +4,7 @@
* 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 2016-2018 XMRig <support@xmrig.com>
* Copyright 2017- BenDr0id <ben@graef.in>
*
*
@ -35,6 +35,9 @@ extern "C"
#include "crypto/c_keccak.h"
}
static inline int random(int min, int max) {
return min + rand() / (RAND_MAX / (max - min + 1) + 1);
}
DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
m_active(false),
@ -65,7 +68,7 @@ DonateStrategy::DonateStrategy(const char *agent, IStrategyListener *listener) :
m_timer.data = this;
uv_timer_init(uv_default_loop(), &m_timer);
idle();
idle(random(3000, 9000) * 1000 - m_donateTime);
}
@ -122,9 +125,9 @@ void DonateStrategy::onResultAccepted(Client *client, const SubmitResult &result
}
void DonateStrategy::idle()
void DonateStrategy::idle(int timeout)
{
uv_timer_start(&m_timer, DonateStrategy::onTimer, m_idleTime, 0);
uv_timer_start(&m_timer, DonateStrategy::onTimer, static_cast<uint64_t>(timeout), 0);
}
@ -135,7 +138,7 @@ void DonateStrategy::suspend()
m_active = false;
m_listener->onPause(this);
idle();
idle(m_idleTime);
}

View file

@ -58,7 +58,7 @@ protected:
void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override;
private:
void idle();
void idle(int timeout);
void suspend();
static void onTimer(uv_timer_t *handle);