Error checking for randomx vm creation
This commit is contained in:
@@ -1175,6 +1175,10 @@ void static RandomXMiner()
|
||||
// TODO: use correct variables
|
||||
randomx_init_cache(randomxCache, &randomxKey, sizeof randomxKey);
|
||||
randomx_vm *myVM = randomx_create_vm(flags, randomxCache, NULL);
|
||||
if(myVM == NULL) {
|
||||
LogPrintf("Cannot create RandomX VM, aborting!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
randomx_calculate_hash(myVM, &randomxInput, sizeof randomxInput, randomxHash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user