Implemented CN-Heavy algo, Algo tests and fixed n-loop variants (#86)
* Debouncing of connection retry when connecting donation server fails * When PoW variant is set on proxy, it will overrule local set PoW * Implementation of cn_heavy algo * Added self test for cn-heavy * Fixed n-loop variant of powV2 and cn-heavy * Fixed n-loop variant of powV2 and added cn-heavy for ARM * Fixing n-loop for arm * Limited cn-heavy to max hashfactor 3 on higher seltest fails. * Removed a lot of casts * Fixed algo selftest
This commit is contained in:
parent
06bb082041
commit
1ce9d2bf3c
17 changed files with 2682 additions and 450 deletions
|
@ -209,20 +209,18 @@ bool Client::parseJob(const rapidjson::Value ¶ms, int *code)
|
|||
if (params.HasMember("variant")) {
|
||||
int variantFromProxy = params["variant"].GetInt();
|
||||
|
||||
if (Options::i()->forcePowVersion() == Options::POW_AUTODETECT) {
|
||||
switch (variantFromProxy) {
|
||||
case -1:
|
||||
Options::i()->setForcePowVersion(Options::POW_AUTODETECT);
|
||||
break;
|
||||
case 0:
|
||||
Options::i()->setForcePowVersion(Options::POW_V1);
|
||||
break;
|
||||
case 1:
|
||||
Options::i()->setForcePowVersion(Options::POW_V2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (variantFromProxy) {
|
||||
case -1:
|
||||
Options::i()->setForcePowVersion(Options::POW_AUTODETECT);
|
||||
break;
|
||||
case 0:
|
||||
Options::i()->setForcePowVersion(Options::POW_V1);
|
||||
break;
|
||||
case 1:
|
||||
Options::i()->setForcePowVersion(Options::POW_V2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -584,7 +582,10 @@ void Client::reconnect() {
|
|||
# endif
|
||||
|
||||
if (m_failures == -1) {
|
||||
LOG_DEBUG("Client::onConnect -> m_failures == -1");
|
||||
LOG_DEBUG("Client::reconnect -> m_failures == -1");
|
||||
m_failures = 0;
|
||||
m_expire = 0;
|
||||
|
||||
return m_listener->onClose(this, -1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue