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:
Ben Gräf 2018-04-07 21:20:24 +02:00 committed by GitHub
parent 06bb082041
commit 1ce9d2bf3c
17 changed files with 2682 additions and 450 deletions

View file

@ -39,7 +39,21 @@ Mem::ThreadBitSet Mem::m_multiHashThreadMask = Mem::ThreadBitSet(-1L);
cryptonight_ctx *Mem::create(int threadId)
{
size_t scratchPadSize = m_algo == Options::ALGO_CRYPTONIGHT ? MEMORY : MEMORY_LITE;
size_t scratchPadSize;
switch (m_algo)
{
case Options::ALGO_CRYPTONIGHT_LITE:
scratchPadSize = MEMORY_LITE;
break;
case Options::ALGO_CRYPTONIGHT_HEAVY:
scratchPadSize = MEMORY_HEAVY;
break;
case Options::ALGO_CRYPTONIGHT:
default:
scratchPadSize = MEMORY;
break;
}
size_t offset = 0;
for (int i=0; i < threadId; i++) {