diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-03-31 13:36:21 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-03-31 13:36:21 -0500 |
| commit | 0253f86fde0988d82a3957a2ac9ce08fbbb896dd (patch) | |
| tree | dfd79d38af4beb90a2a570d0fef71abdec589625 /src/crypto | |
| parent | ccc3726d86b60a7fc2401e940eadda63ef99cb54 (diff) | |
| parent | fe92fa1391c200fce4a247341272011099781369 (diff) | |
| download | monzero-core-0253f86fde0988d82a3957a2ac9ce08fbbb896dd.tar.gz monzero-core-0253f86fde0988d82a3957a2ac9ce08fbbb896dd.tar.xz monzero-core-0253f86fde0988d82a3957a2ac9ce08fbbb896dd.zip | |
Merge pull request #6298
fe92fa1 [randomx] Add missing randomx_vm_set_cache() (cohcho)
Diffstat (limited to 'src/crypto')
| -rw-r--r-- | src/crypto/rx-slow-hash.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/rx-slow-hash.c b/src/crypto/rx-slow-hash.c index 969bf8a0f..606c67336 100644 --- a/src/crypto/rx-slow-hash.c +++ b/src/crypto/rx-slow-hash.c @@ -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 */ |
