Skip to content

Commit

Permalink
Fixed Flex algo multithread issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed May 28, 2024
1 parent 43f7316 commit 6c890b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/backend/cpu/CpuWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "crypto/rx/RxDataset.h"
#include "crypto/rx/RxVm.h"
#include "crypto/ghostrider/ghostrider.h"
#include "crypto/ghostrider/sph_keccak.h"
#include "crypto/flex/flex.h"
#include "net/JobResults.h"

Expand Down Expand Up @@ -100,6 +101,7 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :

# ifdef XMRIG_ALGO_GHOSTRIDER
m_ghHelper = ghostrider::create_helper_thread(affinity(), data.priority, data.affinities);
hard_coded_eb = (m_algorithm.id() != Algorithm::FLEX_KCN) ? 1 : 6;
# endif
}

Expand Down
2 changes: 0 additions & 2 deletions src/crypto/flex/flex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ void flex_hash(const char* input, char* output, cryptonight_ctx** ctx) {
sph_shabal512_context ctx_shabal;
sph_whirlpool_context ctx_whirlpool;
sph_sha256_context ctx_sha;
hard_coded_eb = 6;
void *in = (void*) input;
int size = 80;
sph_keccak512_init(&ctx_keccak);
Expand Down Expand Up @@ -307,5 +306,4 @@ void flex_hash(const char* input, char* output, cryptonight_ctx** ctx) {
sph_keccak256(&ctx_keccak, in, size);
sph_keccak256_close(&ctx_keccak, hash);
memcpy(output, hash, 32);
hard_coded_eb = 1;
}

0 comments on commit 6c890b4

Please sign in to comment.