Attempt to try different randomx flags

This commit is contained in:
Duke Leto
2024-01-06 21:33:23 -08:00
parent 21530ba159
commit 0e0b1cca97

View File

@@ -1099,11 +1099,19 @@ void static RandomXMiner()
// flags |= RANDOMX_FLAG_LARGE_PAGES;
flags |= RANDOMX_FLAG_FULL_MEM;
//flags |= RANDOMX_FLAG_JIT;
randomx_cache *randomxCache = randomx_alloc_cache(flags);
randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_JIT | RANDOMX_FLAG_HARD_AES);
if (randomxCache == NULL) {
LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n");
return;
LogPrintf("RandomX cache is null, trying without large pages and without jit ...\n");
randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_HARD_AES);
if (randomxCache == NULL) {
LogPrintf("RandomX cache is null, trying without hardware AES...\n");
}
randomxCache = randomx_alloc_cache(flags);
if (randomxCache == NULL) {
LogPrintf("RandomX cache is null, cannot mine!\n");
}
}
rxdebug("%s: created randomx flags + cache\n");
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags);
rxdebug("%s: created dataset\n");