Check null randomx dataset before calling randomx_dataset_item_count
This commit is contained in:
@@ -1072,14 +1072,14 @@ void static RandomXMiner()
|
|||||||
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags);
|
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags);
|
||||||
rxdebug("%s: created dataset\n");
|
rxdebug("%s: created dataset\n");
|
||||||
|
|
||||||
auto datasetItemCount = randomx_dataset_item_count();
|
|
||||||
rxdebug("%s: dataset items=%lu\n", datasetItemCount);
|
|
||||||
|
|
||||||
if( randomxDataset == nullptr) {
|
if( randomxDataset == nullptr) {
|
||||||
LogPrintf("%s: allocating randomx dataset failed!\n", __func__);
|
LogPrintf("%s: allocating randomx dataset failed!\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto datasetItemCount = randomx_dataset_item_count();
|
||||||
|
rxdebug("%s: dataset items=%lu\n", datasetItemCount);
|
||||||
|
|
||||||
char randomxHash[RANDOMX_HASH_SIZE];
|
char randomxHash[RANDOMX_HASH_SIZE];
|
||||||
rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE);
|
rxdebug("%s: created randomxHash of size %d\n", RANDOMX_HASH_SIZE);
|
||||||
char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific
|
char randomxKey[82]; // randomx spec says keysize of >60 bytes is implementation-specific
|
||||||
|
|||||||
Reference in New Issue
Block a user