Use a completely different function for RandomX mining to minimize potential of equihash consensus bugs
This commit is contained in:
@@ -1528,11 +1528,17 @@ void static BitcoinMiner()
|
||||
|
||||
for (int i = 0; i < nThreads; i++) {
|
||||
#ifdef ENABLE_WALLET
|
||||
if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH )
|
||||
if ( ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) {
|
||||
minerThreads->create_thread(boost::bind(&BitcoinMiner, pwallet));
|
||||
} else if (ASSETCHAINS_ALGO == ASSETCHAINS_RANDOMX ) {
|
||||
minerThreads->create_thread(boost::bind(&RandomXMiner, pwallet));
|
||||
}
|
||||
#else
|
||||
if (ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH )
|
||||
if (ASSETCHAINS_ALGO == ASSETCHAINS_EQUIHASH ) {
|
||||
minerThreads->create_thread(&BitcoinMiner);
|
||||
} else if (ASSETCHAINS_ALGO == ASSETCHAINS_RANDOMX) {
|
||||
minerThreads->create_thread(&RandomXMiner);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user