Merge pull request #6298

fe92fa1 [randomx] Add missing randomx_vm_set_cache() (cohcho)
This commit is contained in:
luigi1111 2020-03-31 13:36:21 -05:00
commit 0253f86fde
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
1 changed files with 4 additions and 0 deletions

View File

@ -284,6 +284,10 @@ void rx_slow_hash(const uint64_t mainheight, const uint64_t seedheight, const ch
CTHR_MUTEX_LOCK(rx_dataset_mutex);
if (rx_dataset != NULL && rx_dataset_height != seedheight)
rx_initdata(cache, miners, seedheight);
else if (rx_dataset == NULL) {
/* this is a no-op if the cache hasn't changed */
randomx_vm_set_cache(rx_vm, rx_sp->rs_cache);
}
CTHR_MUTEX_UNLOCK(rx_dataset_mutex);
} else {
/* this is a no-op if the cache hasn't changed */