Skip to content

Commit 39bc96a

Browse files
Merge #890: [Miner][Randomx] Optimised RandomX for each machine
de4253d Added file with support for better optimised RandomX (Strontium) Pull request description: ### Problem ### The RandomX miner is running in light mode. ### Root Cause ### This issue was reported by a third party developer who also decided to submit the patch himself, through Strontium. ### Solution ### Need explanation ### Bounty Payment Address ## `sv1` ### Unit Testing Results ### How to test? Tree-SHA512: 8610edbac2490a97e74c523644e3a3bf4366ce9253071cafdea47752c0ca160a6e3577551f3f00ddfca610b7d07c06b01ff30b688304b597f2e1cb9a3c64be51
2 parents 50f1f00 + de4253d commit 39bc96a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pow.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -488,12 +488,12 @@ void StartRandomXMining(void* pPowThreadGroup, const int nThreads, std::shared_p
488488
boost::this_thread::interruption_point();
489489
if (!fInitialized) {
490490
boost::this_thread::interruption_point();
491-
auto full_flags = RANDOMX_FLAG_FULL_MEM;
492-
493-
myMiningCache = randomx_alloc_cache((randomx_flags)global_randomx_flags);
491+
auto full_flags = RANDOMX_FLAG_FULL_MEM | randomx_get_flags();
492+
LogPrint(BCLog::BLOCKCREATION, "%s: RandomX flags set to %s\n", __func__, full_flags);
493+
myMiningCache = randomx_alloc_cache(full_flags);
494494

495495
/// Create the RandomX Dataset
496-
myMiningDataset = randomx_alloc_dataset((randomx_flags)global_randomx_flags);
496+
myMiningDataset = randomx_alloc_dataset(full_flags);
497497
mining_key_block = GetKeyBlock(chainActive.Height());
498498

499499
randomx_init_cache(myMiningCache, &mining_key_block, sizeof(mining_key_block));

0 commit comments

Comments
 (0)